Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 To: vlado buzalka
  Where is vlado buzalka?
 praha
 Czech Republic
 vlado buzalka
 Tags
Subject: RE: how to store file in mysql database from
Thread ID: 373479 Message ID: 373482 # Views: 50 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Friday, March 22, 2013 1:13:17 PM         
   


> Hi friends
>
> I would like to work with SQL server (mySQL) from VFP SP2. In general I do know basics, however I would like to know something specific - how I can store in mySQL from VFP computer file with size for example 10 MB.
>
> I know that it is not advisable, but anyway, how to do that?
>
> Many thanks in advance
>
> Vladimir

Why shouldn't it be advisable? In today's world it is a fair request I think - data is not simply short and primitive values anymore (for example carfax, facebook, youtube, github, groupon ... all store data, don't they).

I don't use MySQL but I expect to be straight forward insertion to a BLOB field. If it were SQL server:

lcValue = createbinary(myFile) && assuming it is a binary file
SQLExec(m.handle, 'insert into myTable (myBlobField) values (?m.lcValue)')


With a cursoradapter it would be a simple tableupdate call.



Cetin Basoz

.Net has got better.Think about moving - check my blog:
My Blog


MongoDb Certified Developer
MongoDb Certified DBA


Support Wikipedia

ENTIRE THREAD

how to store file in mysql database from Posted by vlado buzalka @ 3/22/2013 12:49:12 PM
RE: how to store file in mysql database from Posted by Cetin Basoz @ 3/22/2013 1:13:17 PM
RE: how to store file in mysql database from Posted by vlado buzalka @ 3/22/2013 6:56:11 PM
RE: how to store file in mysql database from Posted by Cetin Basoz @ 3/22/2013 9:26:54 PM