Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trouble with ADO 2.7 Recordset
Message
From
01/05/2002 18:36:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Trouble with ADO 2.7 Recordset
Miscellaneous
Thread ID:
00651650
Message ID:
00651650
Views:
89
I'm trying to open a recordset with no records.
loConnection = CREATEOBJECT('ADODB.Connection')
* Set properties
loConnection.open()

loCommand = CREATEOBJECT('ADODB.Command')
loCommand.ActiveConnection = loConnection
loCommand.CommandType = 1
loCommand.CommandText = 'Select * from (sometable)'

loRecordSet = CREATEOBJECT('ADODB.RecordSet')
loRecordSet.CursorType 	= ADOPENDYNAMIC
loRecordSet.LockType 	= ADLOCKOPTIMISTIC
loRecordSet.ActiveConnection 	= loConnection
loRecordSet.CursorLocation 	= ADUSECLIENT

loRecordSet(Open,,,,ADEXECUTENORECORDS)
I keep getting the following error :
OLE IDispatch exception code 0 from ADODB.Recordset :
Arguments are of the wrong type, are out of acceptable
range, or are in conflict with one another...
Any help would be appreciated,
Jake
Wine is sunlight, held together by water - Galileo Galilei
Un jour sans vin est comme un jour sans soleil - Louis Pasteur
Water separates the people of the world; wine unites them - anonymous
Wine is the most civilized thing in the world - Ernest Hemingway
Wine makes daily living easier, less hurried, with fewer tensions and more tolerance - Benjamin Franklin
Next
Reply
Map
View

Click here to load this message in the networking platform