Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting binary data from vfp
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00652646
Message ID:
00653789
Views:
29
>I have a table with a memo field that actually contains the contents of a file
>like :
>
>

>tmp = filetostr("some file")
>select myTable
>replace FileMemo with tmp
>

>
>How do I get that into a byte array in c#, either using a OleDbDataReader or from a VFP7 dll. The data reader does not seem to let me GetBytes, and I am not sure how to pass the data from a dll. I tried return CREATEBINARY(FileMemo), but it still cuts off at the first null.

The problem with the return is that it's typed as a string, so it won't work properly as a byte array.

One thing you can try to do is return the data as a variant then explicitly try to cast it to a bytearray (ie. using late binding to the data)...
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform