Solved

Connecting to DB off the Internet

Posted on 1998-12-03
5
140 Views
Last Modified: 2010-05-03
I am trying to load a data control with a database off a server from the internet, rather than a local hard drive.  Does anyone know how to do this using the iNet transfer control (or any other way)?
0
Comment
Question by:EvanL
  • 2
  • 2
5 Comments
 
LVL 14

Expert Comment

by:waty
ID: 1447995
I have see an article in a magazine for doing that. I will try to retrieve this magazine and read the article.
0
 
LVL 1

Expert Comment

by:lbk
ID: 1447996
I'm not 100% sure this is what you need, but lets give it a shot. Use RDS (Remote Data Service) to connect to a database over the inet. You need to reference RDS and RDO in your project and set up an ODBC source on the server to the DB you want to access.

Once done so, use the following code to create a recordset on the client machine. That code can then be assigned to a RDO data aware control.

DIM ds AS RDS.DataSpace
DIM df
DIM cn AS RDO.rdConnection

SET ds = NEW RDS.DataSpace
SET df = ds.CreateObject("RDSServer.DataFactory")
SET cn = df.Connect("SERVER=MyServer;DSN=MyODBCRef;"

SET myDataAwareControl.Resultset = cn.OpenResultset("SELECT * FROM etc..."

good luck
LK
0
 
LVL 1

Author Comment

by:EvanL
ID: 1447997
Thanks for the input, but I need a more simple solution.  The server where the DB lies is a leased space.  Therefore, I can't add an ODBC source on there.

Any way to use the MS iNet control and FTP to get the DB?
0
 
LVL 1

Accepted Solution

by:
lbk earned 110 total points
ID: 1447998
In this case I see only one solution. And even that only works if the server is IIS, therefor windows based. You CANNOT access the database via ftp or inet, unless you want to download the DB manually and then access it on the cloent side. Instead you might want to use ASP scripts and return a MIME type, resp. a streeam containing a byte stream with the result data of the query.

So in the ASP file you would write

Respone.WriteBinary Data

and on the client side you would retrieve the data using the INet control as follows

Inet1.GetDocument MyServer/DB.Asp

The asp file then returns the data, and you retrieve it much like an HTML document, excpet that you would have to partse it first.
Good luck... I don't see any other way, sorry
LK
0
 
LVL 1

Author Comment

by:EvanL
ID: 1447999
If the database is a text file, I could download it to the user's PC, access it in the form, and then send the text database back to the server.  

Any ideas on how that can be done?
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now