Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Picture in blob-field of mysql-table ??
Message
 
To
03/04/2003 03:52:22
Albert Beermann
Piepenbrock Service Gmbh & Cokg
Osnabrück, Germany
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00773440
Message ID:
00773508
Views:
12
As discussed in several previous threads, it is a bad idea in general to store a picture in a database. You should instead store the picture in a file and put the path\name in the database.



>Hello everbody !
>i'm experimenting(fighting) with foxpro(6.0),mysql and blob-fields.
>
>i have a form with an oleboundcontrol
>
>with getpic() i select an picture and show it
>
>local l_picture
>create cursor justtostupid(mypicture G)
>append blank
>l_picture = getpict()
>append general mypicture from (l_picture)
>thisform.oleboutcontrol.controlsource = 'justtostupid.mypicture'
>thisform.refresh
>
>this works but i'm sure that using a cursor is a stupid solution !!
>how to do this more directly (objekt_variable)???
>
>then i want to store the picture in a mysql-table (fieldname mypicture type blob)
>guess what ?? again to stupid !!
>l_mypicture = ????????
>l_ok= SQLEXEC(p_connection,'UPDATE xyz SET mypicture = ?l_mypicture where ...')
>
>and of course show the stored picture in my form later
>select * from xyz into cursor mycursor
>thisform.oleboundcontrol.controlsource = ???????
>
>any help welcomed
>best regards
>Albert
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform