Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO and SQL7
Message
 
À
14/08/2000 20:45:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00404773
Message ID:
00404868
Vues:
11
Each element of the array specifies the ascii code for each element of the binary string.

So, in this case, you would need to loop through the array in a manner like this:

var = ""
For x = 1 To Alen(lachunk,1)
var = var + char(lachunk(x))
Next x


Of course in VB, you don't need to go through this additional step..< s >.. And, there may be a way to avoid this step in VFP. However, I am not aware of such a method using OLE-DB. If however, you use SPT (SQL Pass Through, the data comes back in a VFP cursor in the correct manner, obviating the need to do any further post-processing...


>Dear all,
>
>I would like to know if it is possible to return image datatype(binary) as binary data into a VFP variable. I have a sample below but it always return as numeric into an array.
>
>Regards,
>Kueh
>
>Local lcChunk,lnChunkSize, laChunk
>
>
>odata=createobject("adodb.connection")
>
>
>** Good connection
>oData.Open("provider=sqloledb;trusted_connection=yes; ;
>persist security info=False;user id=sa;data source=sqlserver; ;
>initial catalog=northwind;network library=dbmssocn;packet size=32767")
>
>
>oRs=createobject("adodb.recordset")
>
>
>oRs.open("select * from employees ",oData,,,)
>laChunk = Space(0)
>
>
>laChunk = oRs.fields("photos").getchunk(10000)
>
>? lachunk
>disp memo like lachunk
>
>
>
>
>oRs.Close
>oData.Close
>
>
>Release all
>
>Return
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform