General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only