Return to Snippet

Revision: 31162
at August 31, 2010 10:16 by jx_boi


Initial Code
using System.Data;
using System.Data.SqlClient;

if (sqlConn.State == System.Data.ConnectionState.Closed)
    _sqlConn.Conn;

bool suc = false;

SqlCommand insertRow = new SqlCommand(_command, _connString);
insertRow.CommandType = System.Data.CommandType.StoredProcedure;

SqlParameter para = new SqlParameters("@DONE". SqlDbType.Bit);
paraDone.Direction = ParameterDirection.Output;

insertRow.Parameters.AddWithValue("Number", no);
insertRow.Parameters.Add(para);
insertRow.ExecuteNonQuery();

suc = (bool)para.Value;

Initial URL

                                

Initial Description

                                

Initial Title
SQL Output Parameters

Initial Tags
sql

Initial Language
C#