Click to See Complete Forum and Search --> : Visual Interdev ADO Conn


Kostas
August 9th, 2001, 11:05 AM
This is my code....


function _initRecordset1()
{
var DBConn = Server.CreateObject('ADODB.Connection');
DBConn.ConnectionTimeout = Application('Conn1_ConnectionTimeout');
DBConn.CommandTimeout = Application('Conn1_CommandTimeout');
*line352* DBConn.CursorLocation = Application('Conn1_CursorLocation');
DBConn.Open(Application('Conn1_ConnectionString'), Application('Conn1_RuntimeUserName'), Application('Conn1_RuntimePassword'));
var cmdTmp = Server.CreateObject('ADODB.Command');
var rsTmp = Server.CreateObject('ADODB.Recordset');





This is my error....

--------
ADODB.Connection error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

/Project_dev/ASP_1.asp, line 352
----------

Line 352 has an asterisk at the beginning...

I have been beating my head against the wall for hours!! Can someone shed some light on me?! PLEASE!! :-)


Thnx

Cakkie
August 10th, 2001, 01:32 AM
The cursolocation can be one of two things, 2 (aka adUseServer) or 3 (aka adUseClient). These are integer values, so you must make sure that whatever value Application(com1_cursorlocation') is integer. My guess is that it is not integer, or might even be empty. Check the value before assigning it, and when an invalid value is given, replace it with a default.

Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook