C
Cylix
I am going to use ADO.NET to call a sqlserver stored procedure with 1
parameter
The stored procedured will return a record set with one row data.
I have already get connection to the server and added the parameter,
but I cannot get the result by sqldatareader =
sqlcommand.executereader.
I ensure that there is one row return.
Besides, I would like to use the same sqlcommand to run a number of
query in difference function by declaire the variable in global, does
it good idea or I should declaire it in each function?
If it is good to do that, How can I close the sqlcommand and use the
same object in other function just like old ADODB rs.close?
Thank you.
parameter
The stored procedured will return a record set with one row data.
I have already get connection to the server and added the parameter,
but I cannot get the result by sqldatareader =
sqlcommand.executereader.
I ensure that there is one row return.
Besides, I would like to use the same sqlcommand to run a number of
query in difference function by declaire the variable in global, does
it good idea or I should declaire it in each function?
If it is good to do that, How can I close the sqlcommand and use the
same object in other function just like old ADODB rs.close?
Thank you.