Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top