Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
.Tif images and SQL
Message
De
10/08/2004 12:38:57
 
 
À
10/08/2004 08:58:17
Bill Benton
North Florida Software Services
Middleburg, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00932010
Message ID:
00932084
Vues:
24
Bill, I'm experiencing the same problem as you, the difference is that I'm trying to store .PDF files in SQL Server.

Please take a look in thread #918564 and thread #930283.

By now I'm just dealing with an ASP page to show the PDF files. Please see message #930596 to get to the point I'm now.

You can try this code below to store the TIF file in a type Text column and not in a type Image column:
 cSQLDataSource = "YourDSN"
 cSQLUserId     = "YourUserId"
 cSQLPassword   = "YourPassword"

 nSQLHandle = SqlConnect (cSQLDataSource, cSQLUserId, cSQLPassword)

* Storing the TIF file

 cBase64 = StrConv (FileToStr ("C:\temp\Your TIF File.Tif"), 13)

 cSQLString = "Insert Into YourSqlTable (Text_Column) " + ;
              "                  Values (cBase64    ) "

 SQLexec (nSQLHandle, cSQLString)

* Retrieving the TIF file

 cSQLString = "Select Text_Column From YourSqlTable"

 SQLexec (nSQLHandle, cSQLString, "CurResult")
 
 Select CurResult

 StrToFile (StrConv (Text_Column, 14), "C:\temp\Your TIF File.Tif")

 SqlDisconnect (nSQLHandle)
If I can give you any further help, please let me know.

Regards,

Fernando

>I am attempting to store fax images (.TIF) to a SQL Server image column, and be able to restore the images to a .TIF file and process them in the Kodak ImageAdmin viewer.
>
>I have successfully stored the images to SQL (at least it seems as though I have done so) but have had little success extracting them from SQL.
>
>I have tried many different approaches that were far from effective.
>
>Any assistance would be greatly appreciated.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform