Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help- Exporting General Fields Image
Message
From
13/09/2000 13:45:09
 
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Miscellaneous
Thread ID:
00406626
Message ID:
00415954
Views:
21
You can do that with a tool available at www.aspupload.com
this example we use saves a ole JPG file from a SQL database to a file excelhelper.jpg
file_g is the database fildname where the ole object is stored in.The databasename is image



*** savejpg.prg ***
parameters cImagenr
LOCAL lcConnStr,lcSQL,oConnection,rs
su=createobject("aspSmartUpload.SmartUpload")
lcConnStr="DRIVER=SQL Server;SERVER=sqlserver;User Id=sa;PASSWORD=;DATABASE=pictures"
oConnection=CREATEOBJECT("ADODB.Connection")
oConnection.open(lcConnStr)
lcSQL="select file_g from image where ID_image="+cImagenr
rs=oConnection.execute(lcSQL)
rs.close
rs.cursorType=1 && 1=ADOPENKEYSET
rs.open
x=rs.Fields("file_g")
if rs.recordCount>0
su.FieldToFile(x, "c:\excelhelper.jpg")
endif
rs.close
oConnection.close
RETURN
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform