Results 1 to 4 of 4

Thread: Database on a server

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2005
    Posts
    3

    Question 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?

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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?

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2005
    Posts
    3

    Re: Database on a server

    i will need it to be an access database but i dont no what you mean by permissons! sorry!

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Database on a server

    Quote 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:
    1. Dim ADOCn As ADODB.Connection
    2. Dim ConnString As String
    3.  
    4. ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    5.         "Data Source=H:\folder\yourmdb.mdb;" & _
    6.         "Persist Security Info=False"
    7.  
    8. Set ADOCn = New ADODB.Connection
    9. ADOCn.ConnectionString = ConnString
    10. 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
  •  



Click Here to Expand Forum to Full Width