1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
string strRequete =
"INSERT INTO MainData([nom],[Rated power],[Nominal speed],[Shaft line weight],[Mass moment of inertia \"MD²\"],[Stand still torque due to leakage water],[Beginning of normal mechanical brakin],[Beginning of exceptional mechanical braking],[Number of braking jacks],[Mean diameter of braking jacks],[Jack type],[Air pressure for braking] ,[Friction coefficient] ,[Number of braking calipers],[External diameter of disc],[Lining radial width],[Jack_type],[Braking torque],[Pressured bore area],[Spring force (30 mm course)],[Lining width])VALUES(@nom,@id1,@id2,@id3,@id4,@id5,@id6,@id7,@id8,@id9,@id10,@id11,@id12,@id13,@id14,@id15,@id16,@id17,@id18,@id19,@id20)";
oCommand.Parameters.Add(new SqlParameter("@nom", SqlDbType.Float));
oCommand.Parameters.Add(new SqlParameter("@id1", SqlDbType.Float));
oCommand.Parameters.Add(new SqlParameter("@id2", SqlDbType.Float));
oCommand.Parameters.Add(new SqlParameter("@id3", SqlDbType.Float));
oCommand.Parameters.Add(new SqlParameter("@id4", SqlDbType.Float));
...
//Donnée à insérer
oCommand.Parameters["@nom"].Value = Convert.ToDouble(richTextBox1.Text);
oCommand.Parameters["@id1"].Value = Convert.ToDouble(richTextBox1.Text);
oCommand.Parameters["@id2"].Value = Convert.ToDouble(richTextBox7.Text);
oCommand.Parameters["@id3"].Value = Convert.ToDouble(richTextBox2.Text);
oCommand.Parameters["@id4"].Value = Convert.ToDouble(richTextBox3.Text);
... |
Partager