Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing paramenters to multiple stored proc using VB

Status
Not open for further replies.

gadgetguy1111

IS-IT--Management
Mar 19, 2002
20
0
0
SG
Hello,

I'm using vb6 and cr7 for this project.

The report i'm creating uses data returned from 2 stored procedures. Each stored procedure takes the same input parameter.

I'm facing problems passing the parameter to the second stored procedure in VB.

the code is as follows:
CR.Connect = "Microsoft SQL Server;the rest of the connection string"
CR.StoredProcParam(0) = strParam
CR.StoredProcParam(1) = strParam
CR.Destination = crptToWindow
CR.Action = 1

the error says invalid parameter name. it works fine without CR.StoredProcParam(1) = strParam but CR will prompt me to input the value for the second parameter. how can i get pass the second parameter like the first one?


In CR, when i clicked the show sql query menu item, I see only "exec storedproc1 'inputparam'". "exec storedproc2 'inputparam'" is not shown although it will prompt me for the values of both parameters when i refresh the data with a new set of parameters.

any idea what is wrong?

thanks.

--
Boon Kee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top