|
-
May 26th, 2005, 08:46 AM
#1
Thread Starter
New Member
Database on a server
how do you write a program that will connect to a server with a database on to access a user list?
-
May 26th, 2005, 09:09 AM
#2
Re: Database on a server
Welcome to the forums C7AIG.
You don't connect to the server, you make a connection to the database. That is done via a thing called a connection string in which you pass various pieces of connection information.
What makes up this connection string depends on what kind of database you are connecting to.
Are you trying to connect to a:
SQL Server database
Oracle database
MS Access database
In addition, in order for your connection to work, you need to have the proper permissions established. Are they in place?
-
May 26th, 2005, 09:24 AM
#3
Thread Starter
New Member
Re: Database on a server
i will need it to be an access database but i dont no what you mean by permissons! sorry!
-
May 26th, 2005, 09:32 AM
#4
Re: Database on a server
 Originally Posted by C7AIG
i will need it to be an access database but i dont no what you mean by permissons! sorry!
First, to connect, you would do something like this:
VB Code:
Dim ADOCn As ADODB.Connection
Dim ConnString As String
ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=H:\folder\yourmdb.mdb;" & _
"Persist Security Info=False"
Set ADOCn = New ADODB.Connection
ADOCn.ConnectionString = ConnString
ADOCn.Open ConnString
Make you have a reference set to the Microsoft ActiveX Data Objects Library. This example uses the network drive letter H: as an example. Insert whatever is the correct drive letter, path, and database name for your purposes.
The database is setting on a network file server in a network folder. In order to open it, your account has to have been set up with the ability to access that network folder, and use whatever is inside of it. This is typically done by your network administration department.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|