|
 |
asp_web_howto thread: Why won't this recordset open() command work?
Message #1 by kenprogac@h... on Mon, 10 Dec 2001 11:26:45
|
|
Whats wrong with this code? It keepds giving me the erroir
Error Type:
Microsoft JScript runtime (0x800A1391)
'adLockOptimistic' is undefined
/updateDb.asp, line 53
Can someone Help me??
/* THE CODE */
myCon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pathToDb ;
myCon.Open();
/* This code now creates the data set */
var myRs;
myRs = Server.CreateObject("ADODB.Recordset");
mySqlQuery = "SELECT * FROM page";
//myRs.Open mySqlQuery;
myRs.ActiveConnection = myCon;
myRs.Source = mySqlQuery;
myRs.LockType = adLockOptimistic
myRs.Open;
Message #2 by "Pat Waddington" <paw@s...> on Mon, 10 Dec 2001 15:22:35 -0000
|
|
You need to either Include the adobvs.inc file or specify a value for
adLockOptimistic
HTH
----- Original Message -----
From: <kenprogac@h...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Monday, December 10, 2001 11:26 AM
Subject: [asp_web_howto] Why won't this recordset open() command work?
> Whats wrong with this code? It keepds giving me the erroir
>
> Error Type:
> Microsoft JScript runtime (0x800A1391)
> 'adLockOptimistic' is undefined
> /updateDb.asp, line 53
>
> Can someone Help me??
>
> /* THE CODE */
>
> myCon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
pathToDb ;
> myCon.Open();
> /* This code now creates the data set */
>
> var myRs;
> myRs = Server.CreateObject("ADODB.Recordset");
> mySqlQuery = "SELECT * FROM page";
>
> //myRs.Open mySqlQuery;
> myRs.ActiveConnection = myCon;
> myRs.Source = mySqlQuery;
> myRs.LockType = adLockOptimistic
> myRs.Open;
>
>
$subst('Email.Unsub').
>
Message #3 by "Mike Scott" <jstmehr4u3@a...> on Mon, 10 Dec 2001 07:29:40 -0800
|
|
Have you included adovbs.inc in your page? This is the main reason most ADO
Constants don't work.
Have you tried using the integer value of adLockOptimistic?
Mike
----- Original Message -----
From: <kenprogac@h...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Monday, December 10, 2001 11:26 AM
Subject: [asp_web_howto] Why won't this recordset open() command work?
> Whats wrong with this code? It keepds giving me the erroir
>
> Error Type:
> Microsoft JScript runtime (0x800A1391)
> 'adLockOptimistic' is undefined
> /updateDb.asp, line 53
>
> Can someone Help me??
>
> /* THE CODE */
>
> myCon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
pathToDb ;
> myCon.Open();
> /* This code now creates the data set */
>
> var myRs;
> myRs = Server.CreateObject("ADODB.Recordset");
> mySqlQuery = "SELECT * FROM page";
>
> //myRs.Open mySqlQuery;
> myRs.ActiveConnection = myCon;
> myRs.Source = mySqlQuery;
> myRs.LockType = adLockOptimistic
> myRs.Open;
>
>
$subst('Email.Unsub').
>
|
|
 |