mnongkhlaw
Programmer
My asp page uses recordset and grid DTCs. The connection info is in global.asa
When I view the page in IE, it gives :-
ADODB.Connection error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/elect2003/secret.asp, line 34
Snippets from my asp page :-
<!--METADATA TYPE="DesignerControl" startspan
<OBJECT id=rsZone style="LEFT: 0px; TOP: 0px" classid="clsid:9CF5D7C2-EC10-11D0-9862-0000F8027CA0">
<PARAM NAME="ExtentX" VALUE="12197">
<PARAM NAME="ExtentY" VALUE="2090">
<PARAM NAME="State" VALUE="(TCConn=\qcnnElect\q,TCDBObject_Unmatched=\qSQL\sStatement\q,TCDBObjectName_Unmatched=\qselect\ssecret_cod\sfrom\szone\sorder\sby\ssecret_cod\q,TCControlID_Unmatched=\qrsZone\q,TCPPConn=\qcnnElect\q,TCPPDBObject=\qDE\sCommands\q,TCPPDBObjectName=\qcmdZone\q,RCDBObject=\qRCSQLStatement\q,TCSQLStatement_Unmatched=\qselect\ssecret_cod\sfrom\szone\sorder\sby\ssecret_cod\q,TCCursorType=\q3\s-\sStatic\q,TCCursorLocation=\q3\s-\sUse\sclient-side\scursors\q,TCLockType=\q3\s-\sOptimistic\q,TCCacheSize_Unmatched=\q100\q,TCCommTimeout_Unmatched=\q30\q,CCPrepared=0,CCAllRecords=1,TCNRecords_Unmatched=\q10\q,TCODBCSyntax_Unmatched=\q\q,TCHTargetPlatform=\q\q,TCHTargetBrowser_Unmatched=\qServer\s(ASP)\q,TCTargetPlatform=\qInherit\sfrom\spage\q,RCCache=\qRCBookPage\q,CCOpen=1,GCParameters=(Rows=0))"></OBJECT>
-->
<!--#INCLUDE FILE="_ScriptLibrary/Recordset.ASP"-->
<SCRIPT LANGUAGE="JavaScript" RUNAT="server">
function _initrsZone()
{
var DBConn = Server.CreateObject('ADODB.Connection');
DBConn.ConnectionTimeout = Application('cnnElect_ConnectionTimeout');
DBConn.CommandTimeout = Application('cnnElect_CommandTimeout');
DBConn.CursorLocation = Application('cnnElect_CursorLocation');
DBConn.Open(Application('cnnElect_ConnectionString'), Application('cnnElect_RuntimeUserName'), Application('cnnElect_RuntimePassword'));
var cmdTmp = Server.CreateObject('ADODB.Command');
var rsTmp = Server.CreateObject('ADODB.Recordset');
cmdTmp.ActiveConnection = DBConn;
rsTmp.Source = cmdTmp;
cmdTmp.CommandType = 1;
cmdTmp.CommandTimeout = 30;
cmdTmp.CommandText = 'select secret_cod from zone order by secret_cod';
<snipped for brevity>
My global.asa file :-
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
'You can add special event handlers in this file that will get run automatically when
'special Active Server Pages events occur. To create these handlers, just create a
'subroutine with a name from the list below that corresponds to the event you want to
'use. For example, to create an event handler for Session_OnStart, you would put the
'following code into this file (without the comments):
'Sub Session_OnStart
'**Put your code here **
'End Sub
'EventName Description
'Session_OnStart Runs the first time a user runs any page in your application
'Session_OnEnd Runs when a user's session times out or quits your application
'Application_OnStart Runs once when the first page of your application is run for the first time by any user
'Application_OnEnd Runs once when the web server shuts down
</SCRIPT>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
'==Visual InterDev Generated - startspan==
'--Project Data Connection
Application("cnnElect_ConnectionString"
="DSN=elect"
' "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=D:\Mark\elect2003.mdb;"
Application("cnnElect_ConnectionTimeout"
= 15
Application("cnnElect_CommandTimeout"
= 30
Application("cnnElect_CursorLocation"
= 3
Application("cnnElect_RuntimeUserName"
= "Admin"
Application("cnnElect_RuntimePassword"
= ""
'-- Project Data Environment
Set DE = Server.CreateObject("DERuntime.DERuntime"
Application("DE"
= DE.Load(Server.MapPath("Global.ASA"
, "_private/DataEnvironment/DataEnvironment.asa"
'==Visual InterDev Generated - endspan==
End Sub
</SCRIPT>
What might have gone wrong?
TIA
Mark.
When I view the page in IE, it gives :-
ADODB.Connection error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/elect2003/secret.asp, line 34
Snippets from my asp page :-
<!--METADATA TYPE="DesignerControl" startspan
<OBJECT id=rsZone style="LEFT: 0px; TOP: 0px" classid="clsid:9CF5D7C2-EC10-11D0-9862-0000F8027CA0">
<PARAM NAME="ExtentX" VALUE="12197">
<PARAM NAME="ExtentY" VALUE="2090">
<PARAM NAME="State" VALUE="(TCConn=\qcnnElect\q,TCDBObject_Unmatched=\qSQL\sStatement\q,TCDBObjectName_Unmatched=\qselect\ssecret_cod\sfrom\szone\sorder\sby\ssecret_cod\q,TCControlID_Unmatched=\qrsZone\q,TCPPConn=\qcnnElect\q,TCPPDBObject=\qDE\sCommands\q,TCPPDBObjectName=\qcmdZone\q,RCDBObject=\qRCSQLStatement\q,TCSQLStatement_Unmatched=\qselect\ssecret_cod\sfrom\szone\sorder\sby\ssecret_cod\q,TCCursorType=\q3\s-\sStatic\q,TCCursorLocation=\q3\s-\sUse\sclient-side\scursors\q,TCLockType=\q3\s-\sOptimistic\q,TCCacheSize_Unmatched=\q100\q,TCCommTimeout_Unmatched=\q30\q,CCPrepared=0,CCAllRecords=1,TCNRecords_Unmatched=\q10\q,TCODBCSyntax_Unmatched=\q\q,TCHTargetPlatform=\q\q,TCHTargetBrowser_Unmatched=\qServer\s(ASP)\q,TCTargetPlatform=\qInherit\sfrom\spage\q,RCCache=\qRCBookPage\q,CCOpen=1,GCParameters=(Rows=0))"></OBJECT>
-->
<!--#INCLUDE FILE="_ScriptLibrary/Recordset.ASP"-->
<SCRIPT LANGUAGE="JavaScript" RUNAT="server">
function _initrsZone()
{
var DBConn = Server.CreateObject('ADODB.Connection');
DBConn.ConnectionTimeout = Application('cnnElect_ConnectionTimeout');
DBConn.CommandTimeout = Application('cnnElect_CommandTimeout');
DBConn.CursorLocation = Application('cnnElect_CursorLocation');
DBConn.Open(Application('cnnElect_ConnectionString'), Application('cnnElect_RuntimeUserName'), Application('cnnElect_RuntimePassword'));
var cmdTmp = Server.CreateObject('ADODB.Command');
var rsTmp = Server.CreateObject('ADODB.Recordset');
cmdTmp.ActiveConnection = DBConn;
rsTmp.Source = cmdTmp;
cmdTmp.CommandType = 1;
cmdTmp.CommandTimeout = 30;
cmdTmp.CommandText = 'select secret_cod from zone order by secret_cod';
<snipped for brevity>
My global.asa file :-
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
'You can add special event handlers in this file that will get run automatically when
'special Active Server Pages events occur. To create these handlers, just create a
'subroutine with a name from the list below that corresponds to the event you want to
'use. For example, to create an event handler for Session_OnStart, you would put the
'following code into this file (without the comments):
'Sub Session_OnStart
'**Put your code here **
'End Sub
'EventName Description
'Session_OnStart Runs the first time a user runs any page in your application
'Session_OnEnd Runs when a user's session times out or quits your application
'Application_OnStart Runs once when the first page of your application is run for the first time by any user
'Application_OnEnd Runs once when the web server shuts down
</SCRIPT>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
'==Visual InterDev Generated - startspan==
'--Project Data Connection
Application("cnnElect_ConnectionString"

' "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=D:\Mark\elect2003.mdb;"
Application("cnnElect_ConnectionTimeout"

Application("cnnElect_CommandTimeout"

Application("cnnElect_CursorLocation"

Application("cnnElect_RuntimeUserName"

Application("cnnElect_RuntimePassword"

'-- Project Data Environment
Set DE = Server.CreateObject("DERuntime.DERuntime"

Application("DE"



'==Visual InterDev Generated - endspan==
End Sub
</SCRIPT>
What might have gone wrong?
TIA
Mark.