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

Connecting to DB off the Internet

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
EvanL
Asked:
EvanL
  • 2
  • 2
1 Solution
 
watyCommented:
I have see an article in a magazine for doing that. I will try to retrieve this magazine and read the article.
0
 
lbkCommented:
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
 
EvanLAuthor Commented:
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
 
lbkCommented:
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
 
EvanLAuthor Commented:
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

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

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