Solved

How to connect a MS Access database stored on server?

Posted on 2002-04-18
16
181 Views
Last Modified: 2011-08-18
I found a web site that allowed me to upload a MS Access database.  After upload it, that database will stored in db folder of the root directory.

my question is, how to use VB6 to connect to that database to update and retrieve record from database?
i have user name and password already.

what should i do?  please give me the coding on how to connect to the database.  thanks first.
0
Comment
Question by:yongyih
  • 9
  • 7
16 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6950103
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6950290
take some time to clean up your profile

Questions Asked 50
Last 10 Grades Given A A A A A A A A A A  
Question Grading Record 39 Answers Graded / 39 Answers Received
0
 
LVL 2

Author Comment

by:yongyih
ID: 6950720
link to too many areas.. please find out the code for me, thanks.

i will accept comment for questions soon. but some of them i didn't get any answer..how? delete it?

thanks first for find out the code for me.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 70

Accepted Solution

by:
Éric Moreau earned 100 total points
ID: 6950743
Dim oConn

Set oConn = Server.CreateObject("ADODB.Connection")

oConn.Open "Provider=MS Remote;" & _
                  "Remote Server=http://myServerName;" & _
                  "Remote Provider=Microsoft.Jet.OLEDB.4.0;" & _
                  "Data Source=\somepath\mydb.mdb;", _
                  "admin", ""
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6950747
if some questions didn't get comments, you can delete them. for those with comments, you will need to ask CS (http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt) to delete them.
0
 
LVL 2

Author Comment

by:yongyih
ID: 6952295
sorry, i forgot to mention that the VB6 program is run on client side.  That's mean the connection will establish on client side program.

After i copy paste your code, VB cannot find any Server object.

How to solve this problem?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6952308
>>sorry, i forgot to mention that the VB6 program is run on client side.  That's mean the connection will
establish on client side program.

No problem with this.

>>After i copy paste your code, VB cannot find any Server object.

??? Any error message? Are you sure of your Server name? Do you have suffisant privileges?
0
 
LVL 2

Author Comment

by:yongyih
ID: 6952900
error message... something like 'object required' and highlight this 'Set oConn = Server.CreateObject("ADODB.Connection")'

I think VB cannot find the 'Server' object.  What other reference do i need to add in to this project?  or i need to install other software?

thanks for reply.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6953243
use this instead:

Set oConn = CreateObject("ADODB.Connection")
0
 
LVL 2

Author Comment

by:yongyih
ID: 6954077
Private Sub Command1_Click()
Dim oConn As ADODB.Connection
Dim rec As ADODB.Recordset
'Set oConn = Server.CreateObject("ADODB.Connection")
Set oConn = CreateObject("ADODB.Connection")

oConn.Open "Provider=MS Remote;" & _
                 "Remote Server=http://www.brinkster.com;" & _
                 "Remote Provider=Microsoft.Jet.OLEDB.4.0;" & _
                 "Data Source=\db\test.mdb;", _
                 "username", "password"
Set rec = oConn.Execute("select * from test")
MsgBox rec.RecordCount
End Sub

this is my code.  i received an 'Internet Server' Error
why?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6954578
I doubt that you will be able to do it using Brinkster (at least using the general solution)!

You may store an Access database onto your account and you can have ASP pages stock into your accounts that use this database. But it does not seems that VB can access it remotely.

See an example of an ASP page that use a brinkster database at http://www.experts-exchange.com/questions/Q.20141477.html

0
 
LVL 2

Author Comment

by:yongyih
ID: 6955233
o.. cannot use VB to access it remotely... that's too bad.
how about VB.Net? ^_^

I don't know ASP.  Anyway, if you found out a way to access Access database remotely, don't forget to tell me. thanks.
0
 
LVL 2

Author Comment

by:yongyih
ID: 6955238
Cannot access Access database remotely is because of VB or brinkster web site?

please tell me, thanks.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6955894
Brinkster. I have sent an e-mail to their support and I am waiting for an answer (I will use this free 30meg storage if it works!).
0
 
LVL 2

Author Comment

by:yongyih
ID: 6957198
then, remember to tell me how to do it? hehe.. thanks.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6975924
I had this message from the Brinkster support:

We do not support vb, we support VB .NET. The only connection string we have available to give out is coded in asp. If you need further assistance, please post a message in the forums.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

856 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