Calling a Stored Procedure via ODBC .NET Provider

This is a cool tip that Ahmed Salijee gives me:

if (for some reasons) you want to call a stored procedure (with input and output parameters) using the ODBC Provider, in order to work the OdbcCommand used must be created with a special sintax like this:

Dim cmdLT As New Odbc.OdbcCommand("{@p=CALL mystoredproc(@p,@p)}", cnReg)

cmdLT.CommandType = CommandType.StoredProcedure

where the @p are the parameters.

Bookmarked!

Print | posted on Friday, January 14, 2005 10:48 AM

Comments on this post

No comments posted yet.

Your comment:

 (will show your gravatar)
 
Please add 5 and 5 and type the answer here: