Computing.Net > Forums > Programming > Using VB Prog to access Database Online

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Using VB Prog to access Database Online

Reply to Message Icon

Name: JD
Date: May 17, 2002 at 01:28:01 Pacific
Comment:

Heres the deal:
Im using a visual basic 6 program that I want to store a username and a password in a database. Now the database is going to be an online database..not residing on the same computer as the program. How can i access the database if say the address is: http://www.database.com/database.mdb

From the program I want to connect to this database, add username and password and update it.

heres a sample of how I did it when the database was on my computer:
_____________________________________________
Public Sub openANDupdateDB()
Dim db As ADODB.Connection
Set db = New ADODB.Connection

Dim primaryRS As ADODB.Recordset
Set primaryRS = New ADODB.Recordset

db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=C:\WINDOWS\Desktop\databases\UserInfo.mdb;"
primaryRS.Open "PlayerStats", db, adOpenStatic, adLockOptimistic



primaryRS.AddNew
primaryRS("UserName") = name
primaryRS("Password") = pass
primaryRS.Update
primaryRS.MoveNext

databaseBool = True
primaryRS.MoveLast
primaryRS.Close
db.Close
_____________________________________________
This works fine but now instead of the source being: C:\WINDOWS\Desktop\databases\UserInfo.mdb

I need it to be:
http://www.database.com/database.mdb

How can i connect to this server and add and update my database...thanks in advance



Sponsored Link
Ads by Google

Response Number 1
Name: JD
Date: May 18, 2002 at 11:42:26 Pacific
Reply:

Anyone?


0

Response Number 2
Name: Alexander Zhadanov
Date: May 24, 2002 at 13:59:04 Pacific
Reply:

You can't directly open database over the internet. But you can use Microsoft RDS object to access data.
You need to create server COM object which
access data locally on a server and expose
some public methods which do work like adding
users to the table.
Add reference to the Microsoft Remote Data services on a client computer.
On a client side you use such :
dim rs as new RDS.DataSpace
set oRemote = rs.CreateObject("yourserverproject.yourclass","http://www.database.com")
and then use methods of this object:
oRemote.Adduser "UserId","Password"
I hope this help.
Alex


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Using VB Prog to access Database Online

VB 6 with Access www.computing.net/answers/programming/vb-6-with-access/12470.html

connecting to access via VB.NET www.computing.net/answers/programming/connecting-to-access-via-vbnet/12233.html

Send Password to Access DataBase www.computing.net/answers/programming/send-password-to-access-database/4912.html