Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Still More On ADO
Message
De
22/02/2002 15:31:33
 
 
À
22/02/2002 07:31:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00622018
Message ID:
00623903
Vues:
18
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
Fil
Voir

Click here to load this message in the networking platform