Using Parameters.Refresh with Oracle & ado 2.6 
Author Message
 Using Parameters.Refresh with Oracle & ado 2.6

I had a hard time figuring out how to use Parameters.Refresh with
Oracle and ADO 2.6 (provider = msadora.1), so I thought I'd post the
solution I came up with here:

  Set ocmd = New ADODB.Command

  With ocmd
    Set .ActiveConnection = moConn
    .CommandText = "{CALL myPackage.mySp(?)}"
    .CommandType = adCmdText
    .Parameters.Refresh
  End With

  I found after doing this I could inspect the Parameters collection
and see all the parameters defined.  My initial testing also shows you
_don't_ have to supply a "?" for each parameter.  I've tested this
with an SP with five parameters, and it added all five parameters to
my Parameters collection even though I only passed the one "?".

  The wisdom in using Parameters.Refresh has been discussed ad nauseum
on Usenet.  For what I needed to do it was the logical approach.  In
an SP where the parameter count and types are unchanging,
Parameters.Refresh wouldn't be a wise thing to do.



Sun, 11 Apr 2004 02:28:46 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Urgent: Update Oracle disconnected recordset using ADO 2.6 and VB6

2. ADO 2.6 and Oracle 8.1.6 - column data missing when opening a recordset

3. inserting decimal values (ADO 2.6,ORACLE 8,VB 6 sp4)

4. Passing a VB ADO 2.6 recordset to Oracle PL/SQL

5. Strange problem with Ado 2.6 and Oracle

6. Transaction / Oracle 7.3.2 / ADO 2.6

7. HELP: output parameter in a SP ( SQL 2000, ADO 2.6)

8. ADO 2.6 named parameter

9. Refreshing Grid w/Oracle ADO & DE

10. Using ADO 2.6 in .NET

11. Client Performance of Clients using ADO 2.6 ?

12. ADO Parameter Refresh using Stored Procs

 

 
Powered by phpBB® Forum Software