• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 65
  • Last Modified:

writing and reading files from remote locations (over the internet) in VB6

I have attached a project wherein I am able to read and write a file (picture file or document) to an SQL 2012 database using VB6.   The SQL database is utilizing FileStream.   If the VB6 application is on a local client computer on our network along with the SQL server which is located in the SAME PHYSICAL NETWORK, then this code works fine.  The problem is that I want to be able to read and write files to the SQL database over various remote locations via the internet, then I have a problem.  I need to use the VB6 program at remote locations.  What are my options in accomplishing this task.  One person suggested that I write an FTP program to write the file to the SQL server and then a second procedure to write it into the database.   I'd like to think there is an easier way to do this.

Any suggestions?
FileStream--2-.zip
0
al4629740
Asked:
al4629740
  • 7
  • 5
  • 2
1 Solution
 
Martin LissOlder than dirtCommented:
I don't believe I can help you but I thought I'd point out that you didn't actually attach your project.
0
 
al4629740Author Commented:
Maybe I should press Upload.  

Is this not a common thing that people do?  send files over the internet using vb6?
0
 
Martin LissOlder than dirtCommented:
These days I have no proof but I doubt it since VB6 hasn't been supported since 2008. I think your best bet would be to bite the bullet and convert to a more modern language.
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
al4629740Author Commented:
.NET

How easy is it to accomplish the task that I outlined?
0
 
aikimarkCommented:
You should be able to use ADODB to connect to SQL Server.
There are several ODBC providers that might give you connectivity to the database.

With binary data, you might have to use the AppendChunk method.
0
 
al4629740Author Commented:
With binary data, you might have to use the AppendChunk method.

Will that work with FileStream or is that directly with loading files to the database?
0
 
aikimarkCommented:
You add data to rows and columns of a table.  It would be helpful if you stuck with those terms, rather than 'file'.  Reading a file is rather straight forward.  The difficulty is populating a field with that byte stream.
0
 
al4629740Author Commented:
In the case of storing data (files) in this manner, would it be smart to possible load a second database on a separate data partition so that I can control the expanding size?  I think this is what FileStream is all about in SQL.
0
 
aikimarkCommented:
From a design standpoint, I recommend storing files as separate file entities on a server and only storing the path/name of the file in the database.
0
 
al4629740Author Commented:
So there are two different things I think we’re talking about here. On the one hand I could store the files in a separate location on the server and just store the path name in the database. Or the second way I’m following is to store the data of the file in the table of the database.

Since I’m doing transfer of information over the Internet, the first option may be challenging but the second option seems to be more feasible.  What is your thought?
0
 
aikimarkCommented:
If these are small files, you might not pay a terrible penalty on the database end.  My experience is that files stored in columns results in bloated databases and increased backup times.
0
 
al4629740Author Commented:
So here is an idea combining both ideas.  Why not just make a second database that is on a separate partition and use that database as the "file" database.  This way the original database does not get bloated and then I can purge the second database when I need without worry.

What do you think or them apples?
0
 
al4629740Author Commented:
The files would be no bigger than 5 MB each but mostly less than 1 MB
0
 
aikimarkCommented:
The two database solution would be better than the one database solution.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

  • 7
  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now