C
Carter
I know when I manually run a stored procedure, I can
exec MyStoredProcedure "ThisValue"
How do I do that in a vb.net program:
I have tried a gazillion different syntax; the first one, without parameter
information, works, with GetInfo the name of the stored procedure:
Dim cmd as New SqlCommand("GetInfo", cn)
But when I add a value to the optional parameter, I am doing something
wrong:
Dim cmd as New SqlCommand("GetInfo value", cn)
Dim cmd as New SqlCommand("GetInfo "value"", cn)
I'm sure there's something wrong with my syntax, as I don't know how to
"quote" the value when there's already quotes around the expression.
Thanks for your help.
exec MyStoredProcedure "ThisValue"
How do I do that in a vb.net program:
I have tried a gazillion different syntax; the first one, without parameter
information, works, with GetInfo the name of the stored procedure:
Dim cmd as New SqlCommand("GetInfo", cn)
But when I add a value to the optional parameter, I am doing something
wrong:
Dim cmd as New SqlCommand("GetInfo value", cn)
Dim cmd as New SqlCommand("GetInfo "value"", cn)
I'm sure there's something wrong with my syntax, as I don't know how to
"quote" the value when there's already quotes around the expression.
Thanks for your help.