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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO & Stored Procedure Parameters

Status
Not open for further replies.

rb74

Programmer
May 5, 2002
64
US
Hi all,

I have built a stored procedure in SQL Server and I am passing 40 parameters to complete an insert statement. I have seen two methods to pass the parameters. One uses the Command object like so:

Code:
objCommand.CommandType = adCmdStoredProc
objCommand.Parameters("@1E").value = int1E
objCommand.Execute
and the other method like this using a statement:

Code:
objCommand.CommandText = "{ Call dbo.spEval (' & int1E & ')"
objCommand.CommandType = adCmdText
objCommand.Execute

Could you offer your opinions on the best method to pass parameters to a stored procedure? Also, could you point me to a tutorial where I can brush up on working with stored procedures and triggers?


Thanks,

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top