how do you write a program that will connect to a server with a database on to access a user list?
Printable View
how do you write a program that will connect to a server with a database on to access a user list?
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?
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:Quote:
Originally Posted by C7AIG
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.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
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.