Results 1 to 4 of 4

Thread: ODBC Error

  1. #1
    Join Date
    Feb 2004
    Location
    Norway
    Posts
    2

    Question Unanswered: Need some help, getting error in ASP script.

    I have a problem with some of the code to an application.

    At first it should be said that i have never have been into ASP scripting before. I got on job one day, and they tell me to fix it. Now i have struggeld a week, and havn't gotten any closer. Have tried to serach the web, and called some people, but havn't gotten any wiser.

    It might also be mentioned that the application worked fine on a WIN NT 4.0 installation, but have now been moved over to Win2K, due to upgrades. Anyone know if any problems occur when this is done?

    Whenevere i start the webpage, and try to logon to it, i get this error.
    I see that it cant connect to the database, but i dont get it. I have tried to connect to the dbase using tnsPing, sqlplusw and everything works, i can acsess whatevere i want.
    But as i have typed the username and password to logon, this is the error i get.

    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Driverbehandling] Driverens SQLAllocHandle for SQL_HANDLE_ENV mislyktes

    Since this is in Norwegian, i'll translate.

    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Driverhandling] The Drivers SQLAlloHandle for SQL_HANDLE_ENV failed.

    I also get a simmerlar error wich tells me that there is no ODBC driver specifed. That sounds odd to me, cause it is defined in the string.


    Now i get that there is a error in adocom.asp line 27.
    That line is as following:

    vConn.Open Application("EW_CONN_STRING"), Application("EW_USERNAME"), Application("EW_PASSWORD")


    The eintire code for the connection is like this:

    Function OpenConnection()
    'On Error Resume Next

    Dim vConn
    Set vConn = Server.CreateObject("ADODB.Connection")
    vConn.ConnectionTimeout = Application("EW_CONN_TIMEOUT")
    vConn.CommandTimeout = Application("EW_CMD_TIMEOUT")
    vConn.Open Application("EW_CONN_STRING"), Application("EW_USERNAME"), Application("EW_PASSWORD")

    Why m i getting this error? I have the drivers i need for connecting trough MS ODBC for Oracle. Everything seems to be like it should, but it doesn't work.

    Any ideas?

    Any help will be appriciated.
    On beforhand, Thanks
    Last edited by hkvangar; 02-12-04 at 10:30.

  2. #2
    Join Date
    Dec 2003
    Posts
    454
    What is Application("EW_CONN_STRING")?

  3. #3
    Join Date
    Feb 2004
    Location
    Norway
    Posts
    2
    you ask me? well here are the codes that define the strings ("EW_CONN_STRING")

    Originally posted by gyuan
    What is Application("EW_CONN_STRING")?
    'Global connection parameters
    'internt
    'Application("EW_CONN_STRING") = "DRIVER={Microsoft ODBC for Oracle};" _
    ' & "UID=eisweb;PWD=eisweb;ConnectString=eisweb_tussa; "
    'Hos Tussa
    Application("EW_CONN_STRING") = "DRIVER={Microsoft ODBC for Oracle};" _
    & "UID=eisweb;PWD=eisweb;ConnectString=eisweb;"

    Application("EW_USERNAME") = "eisweb"
    Application("EW_PASSWORD") = "eisweb"
    Application("EW_CONN_TIMEOUT") = 20
    Application("EW_CMD_TIMEOUT") = 35


    But if anyone have any good way to conect to a oracle db, i lack the connection scripting... i would like to change the ("EW_CONN_STRING")
    and use a none dynamic string.

  4. #4
    Join Date
    Dec 2003
    Posts
    454
    I did not have a chance to try to connect to Oracle database. For SQL server database, the connection string is like this:

    "driver={SQL Server}; server=ServerName or ServerIP; database=DatabaseName; UID=xxxxxx;PWD=yyyyyy;"

Posting Permissions

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