Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Blob with MySQL
Message
From
01/05/2009 06:46:53
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Using Blob with MySQL
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
MySQL
Miscellaneous
Thread ID:
01397385
Message ID:
01397385
Views:
134
Hii all,
Can anyon tell me how to store and retrieve an image in MySQL BLOB field.
I'm already using FileToStr() and StrToFile() function which are works fine in VFP native table, but still not work when try to update MySQL table.
This is My Code to update MySQL Table. Thanks


Local MCommand, MPict, MPict1

MPict = FiletoStr("C:\AVFP\SWIFT.JPG")
MCarId = "SWIFT"
MPict1 = Cast( MPict1 AS BLOB )

MCommand = "Update Cars Set Pict1 = ?MPict1 Where CarId = ?MCarId"

SQLEXEC(M_IdConnection, MCommand)
Next
Reply
Map
View

Click here to load this message in the networking platform