Passing values to a stored proc
-
can somebody tell me the ways of passing values to stored proc from C++ or C# code.
vikas da
i am not sure if u really meant that..here i sent cek_no value to my stored proc. like that.. cmd.Parameters.AddWithValue("cek_no", System.Data.SqlDbType.NVarChar).Value=table.Row[i][0].ToString();
-
i am not sure if u really meant that..here i sent cek_no value to my stored proc. like that.. cmd.Parameters.AddWithValue("cek_no", System.Data.SqlDbType.NVarChar).Value=table.Row[i][0].ToString();
-
Thanks for the answer i ment in my question was suppose u need to pass 5 parameters .. so we can wither pass them separately or is there any other way to pass them when i can pass as single argument.
vikas da
-
can somebody tell me the ways of passing values to stored proc from C++ or C# code.
vikas da
Create a command object (sql client) add an array of sql parameters add a valid connection string to the command object execute the command (executescalar) Will you please do some research, a simple Google query will do - this question has been answered 1000s of times before and there are many many examples on the net showing you how to do this.
Never underestimate the power of human stupidity RAH
-
Create a command object (sql client) add an array of sql parameters add a valid connection string to the command object execute the command (executescalar) Will you please do some research, a simple Google query will do - this question has been answered 1000s of times before and there are many many examples on the net showing you how to do this.
Never underestimate the power of human stupidity RAH
No, it seems that he wants to pass a class or struct or something.
-
No, it seems that he wants to pass a class or struct or something.
PIEBALDconsult wrote:
pass a class or struct
How did you get that from the OP. The the answer would still be the same with an explanation that you cannot pass objects unless they are as xml data type X|
Never underestimate the power of human stupidity RAH
-
PIEBALDconsult wrote:
pass a class or struct
How did you get that from the OP. The the answer would still be the same with an explanation that you cannot pass objects unless they are as xml data type X|
Never underestimate the power of human stupidity RAH
Mycroft Holmes wrote:
How did you get that from the OP.
He's cheating, the mindreader function is to be released with SQL:2012.
"When did ignorance become a point of view" - Dilbert