Save Picture File in SQL Server Table

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: NR (NR_at_discussions.microsoft.com)
Date: 08/04/04


Date: Wed, 4 Aug 2004 03:07:02 -0700

Hi there,

I need to know how can i save picutre in SQL Server table.
I am using VFP 6.0 as front end and SQL Server at back end. I have already tried FILETOSTR() AND STRTOFILE() Function which performs well with Foxpro table but it does not work with SQL Statement as follow;
tmpString=FILETOSTR("Picture.Bmp")
=SQLExec(connHandler,"Insert Into temp (EmpPhoto) Values ('"+tmpString+"')")
It looks String already contains some single quotes which creats ambiguity.

Would be very thankful for any help in this regard.



Relevant Pages

  • Re: Local View vs Remote View
    ... view for SQL Server tables or the one containing the remote view for VFP ... I'm trying to create forms which will handle both VFP data and SQL Server ... The VFP tables used in this case are counterparts of the ones used ...
    (microsoft.public.fox.helpwanted)
  • Re: SV: Fox to SQL Server
    ... I use Agent too, and I see the same thing. ... Anders' replies have 'SV:' prepended to the subject. ... >>Another way is to create a connection in a VFP datebase to the SQL Server DB ...
    (microsoft.public.fox.programmer.exchange)
  • RE: Local View vs Remote View
    ... Some data will be from SQL Server and some from VFP. ... be accessed using ODBC remote views. ... Table1 and table2 have structures ...
    (microsoft.public.fox.helpwanted)
  • Re: SV: Fox to SQL Server
    ... >Another way is to create a connection in a VFP datebase to the SQL Server DB ... >Open Help and search 'remote view'. ... >VIEW, TableUpdateand all the SQLPassThrough functions, that is the ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Visual FoxPro vs MS-SQL
    ... In many scenarios, it may well be a wash. ... applications as much as the database engine itself. ... SQL Server supports greater query complexity with little care about how many ... VFP generally wins until you're getting into the million record arena. ...
    (microsoft.public.fox.programmer.exchange)