General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Hi JCF:
I had a feeling you'd be answering this one for me :o)
As always, thanks. I'll try it out and let you know.
Mal
>>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
Previous
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