Re: How to Save Picture

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


Date: Tue, 3 Aug 2004 04:45:02 -0700

SQL Statement didn't work.
I think some of the characters are comming in string which cannot be pass to SQL Server like ESCAPE.
OR
Single quote is comming in the string which creates ambiguity.

VFP Functions "FileTOSTR()" and "STRToFile()" are working properly with Foxpro Tables, need to store Picture in SQL Server table.
Would be very thankful if get my problem resolved at earliest.

"Devapriya De Silva" wrote:

> HI,
>
> You may try the following.
>
> lnCon - a connection handle to the sql server
> lcImage = FILETOSTR(YourImage.BMP)
>
> ?SQLEXEC(lnCon,"insert into pubs.dbo.pub_info1 (logo, pub_id,pr_info) values
> ('" + lcimage +"','5000','THis is my image')")
>
> data type of the Logo field is Image.
>
> Also you may see Using text, ntext, and image Functions in SQL server Books
> Online.
>
> Kind Regards,
> Devapriya De Silva
>
> "NR" <NR@discussions.microsoft.com> wrote in message
> news:C18281BB-B2C5-4E2D-93AD-E05DA4CAB8F9@microsoft.com...
> > Hi there,
> >
> > I am using VFP as front end and SQL Server as back-end database. Need to
> know, how can i save picture(embeded picture) in SQL Server table.
> > Which datatype i will have to select in VFP and what would be the SQL
> Query to save it in SQL Server's table.
> >
> >
> >
>
>
>



Relevant Pages

  • Re: Linking tables access - sql server 2005
    ... Another advantage of this method is that you don't need an ODBC setting on the local computer, ... Create a linked table to SQL Server without using a DSN ... Name of the table that you are linking to on the SQL Server database ... Function AttachDSNLessTable(stLocalTableName As String, stRemoteTableName As String, stServer As String, stDatabase As String, Optional stUsername As ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Cannot Generate SSPI Context - help
    ... I have used the following DSN-less string: ... Microsoft OLE DB Provider for SQL Server error '80004005' ... When a connection is "trusted," it means ... > How would one connect to a remote SQL Server using Windows authen? ...
    (microsoft.public.inetserver.asp.db)
  • Re: INSERT Query problem with Quotes & Apostrophes
    ... I've got front-ends that go against both Jet and SQL Server databases. ... InputText As String, _ ... >> Delimiter, Delimiter & Delimiter) ... dDateTime, ...
    (microsoft.public.access.modulesdaovba)
  • Re: ADO.NET 2.0 saving single space to SQL?
    ... It is code someone else wrote quite some time ago and all of the string ... Hitchhiker's Guide to Visual Studio and SQL Server ... and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: using OpenXML in T-sql?
    ... am not the most senior person in sql server programming, ... especially xml stuff. ... style string in place of an array without the additional ... >delimited strings and opts for the xml string instead. ...
    (microsoft.public.sqlserver.programming)