Click to See Complete Forum and Search --> : ADO in ASP


August 20th, 1999, 03:01 AM
i tried to connect my program in an ASP page to SQL server reside on a server.. but the below error occur.. anyone have any idea about it?

===============================================================================
ADODB.Connection error '800a0bb9'

The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another
===============================================================================

Lothar Haensler
August 20th, 1999, 03:07 AM
post the offending code.
did you #include adovbs.inc?

August 20th, 1999, 03:38 AM
This is because any variables declared are not matching the fields types in the SQL database.
Declare option explicit also to force all variable to be explicitly initialised. Otherwise inadvertant declaration/initialisation of variables may result in mismatch

August 20th, 1999, 05:10 AM
i'm using data environment to set up the connection... but this connection work for html page... not ASP.. that's weird... the following code with '*' is where the error occur.....



<SCRIPT LANGUAGE="JavaScript" RUNAT="server">
function _initRecordset1()
{
var DBConn = Server.CreateObject('ADODB.Connection');
DBConn.ConnectionTimeout = Application('SS_ConnectionTimeout');
DBConn.CommandTimeout = Application('SS_CommandTimeout');
DBConn.CursorLocation = Application('SS_CursorLocation');
* DBConn.Open(Application('SS_ConnectionString'), Application('SS_RuntimeUserName'), Application('SS_RuntimePassword'));
var cmdTmp = Server.CreateObject('ADODB.Command');
var rsTmp = Server.CreateObject('ADODB.Recordset');
cmdTmp.ActiveConnection = DBConn;
rsTmp.Source = cmdTmp;
cmdTmp.CommandType = 2;
cmdTmp.CommandTimeout = 10;
cmdTmp.CommandText = '"employee"';
rsTmp.CacheSize = 10;
rsTmp.CursorType = 3;
rsTmp.CursorLocation = 3;
rsTmp.LockType = 3;
Recordset1.setRecordSource(rsTmp);
Recordset1.open();
if (thisPage.getState('pb_Recordset1') != null)
Recordset1.setBookmark(thisPage.getState('pb_Recordset1'));
}
function _Recordset1_ctor()
{
CreateRecordset('Recordset1', _initRecordset1, null);
}
function _Recordset1_dtor()
{
Recordset1._preserveState();
thisPage.setState('pb_Recordset1', Recordset1.getBookmark());
}

Lothar Haensler
August 20th, 1999, 06:37 AM
check the values of your application variables using response.write.
Did you define an Application for your ASP in IIS?
If not, there won't be any application variables!

August 22nd, 1999, 09:59 PM
i tried it.. nothing happen... means that there's no application variable....

but why if i compose an ASP page using interdev on the server, it works...
when it comes to ASP page compose at client side using interdev, it didn't works....

any idea???