1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
private int InsertRecord(LoadA poLoad)
{
SqlCommand oCmd = new SqlCommand(SQL_INSERT, mcnn);
oCmd.Parameters.Add("@pNInstallation", System.Data.SqlDbType.Int).Value = poLoad.n_installation;
oCmd.Parameters.Add("@pFName", System.Data.SqlDbType.VarChar).Value = poLoad.f_name;
oCmd.Parameters.Add("@pNTInstallation", System.Data.SqlDbType.Int).Value = poLoad.n_t_installation;
oCmd.Parameters.Add("@pFamilyVersion", System.Data.SqlDbType.Int).Value = poLoad.family_version;
//oCmd.ExecuteNonQuery();
//SqlDataReader reader = oCmd.ExecuteReader();
SqlDataReader reader = oCmd.ExecuteReader(System.Data.CommandBehavior.KeyInfo);
poLoad.DataChanged = false;
oCmd.Dispose();
oCmd = null;
return 0;
} |
Partager