Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Viewing images stored by Visual FoxPro
Message
 
 
À
01/05/2003 12:47:25
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00781312
Message ID:
00783757
Vues:
11
Ed,

By the way, I still would suggest you to ask this question in UT VFP forum Internet applications category. You would get more replies this way...

>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
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform