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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement