www.webdeveloper.com
Results 1 to 6 of 6

Thread: database connection

  1. #1
    Join Date
    Jan 2003
    Location
    PA
    Posts
    1,898

    database connection

    We currently have a site that uses asp and microsoft access. I want to change one of my pages to get data from a db2 udb database. Below is my connection string I currently use. What would I need to change to talk to db2 udb?
    Code:
    if (db) <> "" then
    Set conn = server.createobject("adodb.connection")
    DSNtemp="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(db)
    conn.Open DSNtemp
    End If
    Thanks

  2. #2
    Join Date
    May 2007
    Location
    St. Louis, MO
    Posts
    36
    sorry, wrong thread

  3. #3
    Join Date
    Jan 2003
    Location
    PA
    Posts
    1,898
    Our network server person said they installed the db2 client, imported the dsn names and checked out the ones they had connection to. That being said, how do I get my asp (not .NET) page to connect to this database?

    Thanks.

  4. #4
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    You will need to consult the docs of the database you are attempting to connect to. Also ensure it complies to ODBC standards, etc.

  5. #5
    Join Date
    Jan 2003
    Location
    PA
    Posts
    1,898
    I've had my network admin and our database admin working on this, but we can't seem to get my asp (not .NET) page to connect to the DB2 table. They have installed the DB2 client and have done a test connection to the DB2 table. When I try to connect usig the below, I get the below error:
    Code:
    if (dbtype = "DB2") then
    		DSNtemp = "Provider=IBMDADB2;DSN=INET;User ID=netbtprd;Password=SOY6ITN8"	
    		conn.Open DSNtemp
    Error:
    Code:
    Provider error '80004005'
    Unspecified error
    /corp/inc/dbconn.asp, line 13
    Can anyone here help?

    Thanks

  6. #6
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    Could be permissions. Or perhaps an unregistered DLL. Or even a corrupt file. It could literally be one of a million things. Keep trying!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles