Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO RecordSet Object
Message
From
08/02/2000 09:45:49
 
 
To
07/02/2000 17:24:40
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00328177
Message ID:
00328755
Views:
24
>Thanks J:
>
>As usual, you are always very helpful.
>Question: How do you set/send parameters for RecordSet.Open? Is it like the Command Object?
>
>With a Command Object it's ...
>Dimension aparam[1]
>aparam[1] = "send me"
>oRecordSet = oCommand.Execute(...,@aparam,...,...)
>
>What would the code look to ESTABLISH the parameter and then SEND the parameter using RecordSet.Open(...)?
>
>Again, TIA
>
>>>Hello:
>>>
>>>Is there a way to pass parameters to a stored procedure, in SQL SERVER
>>>7.0, via the ADO RecordSet Object instead of the ADO Command Object?
>>>
>>>Reason: Need a RecordSet that's not READONLY.
>>>
>>>TIA
>>
>>Yes, but you still use a command object. Just replace the line where you use the command.Execute with the recordset.Open and pass the command object as the source. Specify the needed parameters in the rest of the RS's parameters.

Malcolm,

To use a stored procedure that requires parameters, you need to define a command object. What I meant by the recordset's parameters is the ones where you specify the type of cursor you want to open, as in recordset.Open(Source, ActiveConnection, CursorType, LockType, Options).
The trick is to create the command object with the required parameters and then pass it as the Source of the recordset.Open.
And thanks for the kind words!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform