If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > ODBC Error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-12-04, 03:17
hkvangar hkvangar is offline
Registered User
 
Join Date: Feb 2004
Location: Norway
Posts: 2
Question 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 09:30.
Reply With Quote
  #2 (permalink)  
Old 02-12-04, 12:29
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
What is Application("EW_CONN_STRING")?
Reply With Quote
  #3 (permalink)  
Old 02-13-04, 01:57
hkvangar hkvangar is offline
Registered User
 
Join Date: Feb 2004
Location: Norway
Posts: 2
you ask me? well here are the codes that define the strings ("EW_CONN_STRING")

Quote:
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.
Reply With Quote
  #4 (permalink)  
Old 02-13-04, 16:53
gyuan gyuan is offline
Registered User
 
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;"
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On