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
al4629740Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.