General information
Category:
Coding, syntax & commands
Hi,
The answer that I got from most people is that it is not possible with VFP. Since the GetChunk funtion returns a byte string which is essentially an array of byte and VFP just react accordingly. The difference with VB is that VB has a datatype to handle such data and is able to convert it into string natively.
Regards,
Kueh
>Kim,
>Did you ever get this to work. And - if so How so?
>Terry
>
>
>>Dear all,
>>
>>I would like to know how to return binary data into a string variable from a image datatype of SQL via ADO GetChunk. My problem is that GetChunk returning the data as HEX and store it in an array. Any suggestions.
>>
>>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")
>>**initial catalog=northwind;network library=dbmssocn")
>>
>>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
>>
>>
>>Regards,
>>Kueh
Previous
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