ADODB recordset not opening!!!!!

MaximusArcher

Registered User.
Local time
Today, 04:03
Joined
Apr 7, 2005
Messages
15
using the below:

SQL = "SELECT * FROM Criteria_Scheme CS WHERE CS.Value<>0 And CS.Position<>0"

.ActiveConnection = p_CurrDBConn
.CursorType = adOpenKeyset
.Open SQL, p_CurrDBConn

getting Method 'Open' of object '_recordset' failed.

However if I paste the sql into a query and run it returns a record fine.

Any ideas? Have I supplied enough info?

Cheers,
Matt.
 
Never mind - have found it out.

Was using SQL-92 reserved word in sql string.

compiling the sql as...

SQL = "SELECT * FROM Criteria_Scheme CS WHERE CS.[Value]<>0 And CS.[Position]<>0"

...works just fine.
 

Users who are viewing this thread

Back
Top Bottom