Information générale
Catégorie:
Codage, syntaxe et commandes
Erwin, I am having a problem ! I am a doing my first work with ADO for an Access project (wish it was in VFP, oh well.) could you look at the following ?
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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement