SqlConnection Con= new SqlConnection(Connection);
Con.Open();
SqlParam[] SqlPar = new SqlParam[1];
SqlPar[0] = new SqlParam("@name", SqlDbType.BigInt);
SqlPar[0].Value = name;
string SqlQuery = "SP-Name";
SqlCommand SqlCmd = new SqlCommand(SqlQuery, Con);
SqlCmd.CommandType = CommandType.StoredProcedure;
SqlCmd.CommandTimeout = 0;
SqlCmd.Parameters.Add(SqlPar[0]);
SqlDataReader DBReader = SqlCmd.ExecuteReader();
ItemTypeCode = "";
ParentItemID = -1;
if (DBReader.Read())
{
ItemTypeCode = DBReader.GetString(4).Trim();
ParentItemID = DBReader.GetInt64(5);
}
DBReader.Close();
Con.Close();
25.3.08
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment