Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to connect a MS Access database stored on server?

Posted on 2002-04-18
16
Medium Priority
?
186 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 7
16 Comments
 
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 70

Accepted Solution

by:
Éric Moreau earned 400 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

704 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