ODBC access from HTA script fails
I am trying to connect to Oracle via ADO from a HTA(HTML Application) script.
I have trying both DSN and DSNLESS connections, see code below.
I have also tried the Microsoft ODBC for Oracle, Oracle 9i ODBC and Oracle10g ODBC drivers.
I have tried doing the connection from both vbscript and javascript.
Everything I try gives me the "[Microsoft][ODBC Driver Manager} Driver's SQLSetConnectAttr failed" error.
Any help will be greatly appreciated!
*** CODE ***
<script Language="JavaScript"><!--
function dotheconnectionx()
{
var sConnect="DSN=prod2;UID=tts;PWD=tts";
var objConnx= new ActiveXObject( "ADODB.Connection" );
objConnx.Open( sConnect );
alert(objConnx.errors.count);
alert(objConnx.errors(0).description);
}
//--></script>
<script language="vbscript">
Dim objConn
Dim rsetQuery
Dim tmpSQL
Dim tmpDSN
tmpDSN="DSN=prod2;uid=tts;pwd=tts"
Dim strConn
strConn="Driver={Microsoft ODBC for Oracle}; CONNECTSTRING=prod; uid=TTS; pwd=tts;"
sub dotheconnection
Set objConn = CreateObject("ADODB.Connection")
objConn.ConnectionString = tmpDSN
objConn.Open
If objConn.errors.count <> 0 Then
alert(objConn.errors.count)
alert("problem connecting to the database")
alert(objConn.errors(0).description)
alert(objConn.ConnectionString)
end if
end sub
</script>
<body onload="dotheconnection();">