Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO question
Message
From
22/02/2002 11:42:53
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
ADO question
Miscellaneous
Thread ID:
00623754
Message ID:
00623754
Views:
39
Hello all, and thanks for looking.

I am using the following code to populate a recordset using a date range query...

' Instantiate the objects using New
Set cnn = New ADODB.Connection
Set cmdRsmast = New ADODB.Command
Set rstRsmast = New ADODB.Recordset

' Seting the ConnectionString properties and opening the objects
cnn.ConnectionString = CurrentProject.Connection
cnn.Open


cmdRsmast.ActiveConnection = cnn
cmdRsmast.CommandText = "Select * from rsmast " & _
"where beg_date between ? and ?"
cmdRsmast.CommandType = adCmdText
rstRsmast.CursorType = adOpenDynamic ' Why doesn't this work !!!!!
Set rstRsmast = cmdRsmast.Execute(Parameters:=Array(ldStartDate,
ldEndDate))

I am using the cmdRsmast.execute method to fill a recordset with date
range parameters, in this case rstRsmast.

Problem: I want the cursor type to be adOpenDynamic, but after the
"Set rstRsmast ..." command the cursor type is adOpenForward only !
How do I get around this ?

Thanks in advance !

Ken
Next
Reply
Map
View

Click here to load this message in the networking platform