Hi Nadya,
Here is the ASP code I use to extract the photos from the database, as far as the VFP code the original APPEND GENERAL line is the only relevant VFP code.
Option Explicit
Dim id, strSQL
id = Session("Suniq")
'connection to db
Dim conn, cmd, rs
Set conn = Server.CreateObject("ADODB.Connection")
Set cmd = Server.CreateObject("ADODB.Command")
conn.Open "dsn", "userid", "password"
cmd.ActiveConnection = conn
'sql query
strSQL = "SELECT stuphoto FROM stuphoto WHERE suniq=" & id
cmd.CommandText = strSQL
cmd.CommandType = adCmdText
Set rs = cmd.Execute
'write the photo back to calling page
Response.ContentType = "image/bmp"
Response.BinaryWrite rs("stuphoto")
'clean up
rs.Close
conn.Close
Set conn = Nothing
Set rs = Nothing
Set cmd = Nothing
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only