Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADODB.Connection error '800a0bb9'

Status
Not open for further replies.

mnongkhlaw

Programmer
Joined
Feb 22, 2002
Messages
62
Location
IN
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=&quot;DesignerControl&quot; startspan
<OBJECT id=rsZone style=&quot;LEFT: 0px; TOP: 0px&quot; classid=&quot;clsid:9CF5D7C2-EC10-11D0-9862-0000F8027CA0&quot;>
<PARAM NAME=&quot;ExtentX&quot; VALUE=&quot;12197&quot;>
<PARAM NAME=&quot;ExtentY&quot; VALUE=&quot;2090&quot;>
<PARAM NAME=&quot;State&quot; VALUE=&quot;(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))&quot;></OBJECT>
-->
<!--#INCLUDE FILE=&quot;_ScriptLibrary/Recordset.ASP&quot;-->
<SCRIPT LANGUAGE=&quot;JavaScript&quot; RUNAT=&quot;server&quot;>
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(&quot;cnnElect_ConnectionString&quot;)=&quot;DSN=elect&quot;
' &quot;Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=D:\Mark\elect2003.mdb;&quot;
Application(&quot;cnnElect_ConnectionTimeout&quot;) = 15
Application(&quot;cnnElect_CommandTimeout&quot;) = 30
Application(&quot;cnnElect_CursorLocation&quot;) = 3
Application(&quot;cnnElect_RuntimeUserName&quot;) = &quot;Admin&quot;
Application(&quot;cnnElect_RuntimePassword&quot;) = &quot;&quot;
'-- Project Data Environment
Set DE = Server.CreateObject(&quot;DERuntime.DERuntime&quot;)
Application(&quot;DE&quot;) = DE.Load(Server.MapPath(&quot;Global.ASA&quot;), &quot;_private/DataEnvironment/DataEnvironment.asa&quot;)
'==Visual InterDev Generated - endspan==
End Sub
</SCRIPT>


What might have gone wrong?

TIA
Mark.
 
Try adding the following:

Const adOpenStatic = 3
Const adLockOptimistic = 3

before the line of code:

var DBConn = Server.CreateObject('ADODB.Connection');
 
Thanks a lot! I found the solution on Microsoft's site. I clicked Create button in the Web Properties' directory tab, and that solved the problem, but I got a new one (before that I had changed connection string to an OLEDB one):-

When I try to view it in IE with the web directory's authentication method set to Basic Authentication, it asks for username and password for which I have provided (using an NT username and password), after which the page (and all subsequent asp pages) displays OK.

But when the directory's authentication is set to &quot;Allow Anonymous Access&quot; or Win NT Challenge/Response&quot; and I try to view the page, I get :-

Microsoft JET Database Engine error '80004005'
Unspecified error
/elect2003/secret.asp, line 35

I guess its something to do with file access permissions, but I'm unable to trace it out. I would like to set the authentication to allow anonymous access to the site.

What should I do? Please help!

Mark Nongkhlaw
mark@shillong.meg.nic.in
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top