I am developing a software with vb6.0 🙁 .
I wanna to know that what the best code for saving a file in SQL server and then reading from it is?
I should say that I use ADODB.Stream when saving file…..
what is you suggestion?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Do you need to save to sql. An alternative, and IMO better solution is to save the docs to a folder on your regular file system and save the reference to it in sql.
Unless you have specific reason for wanting to save in sql?
Is there a specific reason you need to use vb6. Legacy?
Here is an example in .NET on achieving what you require, it should be pretty straightforward to convert to VB6
http://www.jstawski.com/archive/2007/05/17/save-documents-with-sql-server-and-display-them.aspx
UPDATE: With VB6 an example using ADODB.Stream to store and retrieve images, which should be similar to what you need:
http://www.devx.com/tips/Tip/14246