You can call a stored procedure and receive an integer result from column "output_col" in C# as follows:
main.cs1124 chars32 lines
Replace <connection_string>
with the actual connection string to your SQL Server instance and <stored_procedure_name>
with the name of your stored procedure. Also, add any required input parameters to the stored procedure by calling cmd.Parameters.AddWithValue
for each parameter before adding the output parameter. Finally, retrieve the integer output value from the output parameter by calling cmd.Parameters["@output_col"].Value
.
gistlibby LogSnag