Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO Command Object Question
Message
De
03/03/2000 09:57:55
 
 
À
03/03/2000 00:28:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00341085
Message ID:
00341228
Vues:
26
>Hi All:
>
>I've been able to execute a Stored Procedure in SQL SERVER 7.0 using the ADO Command Object passing 1 parameter via a COM (.exe) I wrote in VFP. It works great and it's SUPER fast.
>
>Now I need to send THREE (3) parameters to the Stored Procedure and I'm not sure how this is done. I've tried this ...
>
>I've tried this ....
>
>DIMENSION aParameters[3]
>aParameters[1] = lnFirstVar
>aParameters[2] = lnSecondVar
>aParameters[3] = lnThirdVar
>oCommand.Execute(,@aParameters,)
>
>... and it didn't work. What am I doing wrong here? Is it possible to send more than one parameter?
>
>Thanks In Advance,
>
>Mal

While you can do it with arrays, it is more efficient if you use the parameters collection. What you have to do is define the parameters with the command's .CreateParameter method and then append them with the commands's .Append method. syntax is as follows:

prm = myCmdObject.CreateParameter(cName, nDataType, nPrmType, eValue)
myCmdObject.Append(prm)

and then just execute the with .Execute
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform