Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving Binary File to/from SQL*Server
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00577111
Message ID:
00577395
Views:
21
>Hello,
>Right now I amusing a SQL*Server "TEXT" Data Field to store attachments -- they could be .DOC, .XLS, .JPG, .BMP, or any type of file. I use a remote view and a MEMO fields as the corresponding field in the VFP cursor. I use
>
>Append MEMO cFieldName from (lcFileName) overwrite
>
>to get the data in and
>
>Copy MEMO cFieldName to (lcFileName)
>
>to get the data out.
>
>I finally had a user complain about some file corruption and I am wondering if I should switch the SQL*Server field to a IMAGE or Binary type field? Also should I use the FiletoStr() and StrToFile() commands instead of Append Memo and Copy Memo?
>
>
>Thanks for any advice or insights,
>
>kevin

Kevin;

My preference for storing any document, picture, etc. is to use a character field and use the path to the referenced file, regardless of the backend in use. Everyone has a way to do things and this is what has given me the fewest problems.

By the way one of my clients was the nuclear energy industry. The application runs nuclear power plants and requires many documents to be accessible. As the operators went through each stage of operation a document would be available to compare internationally approved methodologies. If there were a problem a link to the proper document would be presented. The operator would continue and if that did not resolve the issue the supervisor would be alerted and the system brought to a hault. This included power up/power down and water exchange. If there were corruption of any documents I would not want to consider the consequences.

Tom
Previous
Reply
Map
View

Click here to load this message in the networking platform