26-11-17, 08:44 PM
كود :
اعمل جملتين انسيرت مثلاً :
الجملة الاولى حفظ في جدول 1
Cmd As New SqlCommand("insert into table1 (id,name) values (@id,@name)", conn)
Cmd.Parameters.AddWithValue("@id", txtid.Text)
Cmd.Parameters.AddWithValue("@name", txtname.Text)
conn.open
Cmd.ExecuteNonQuery()
الجملة الثانية حفظ في جدول 2
Cmd = New SqlCommand("insert into table2 (id,name) values (@id,@name)", conn)
Cmd.Parameters.AddWithValue("@id", txtid.Text)
Cmd.Parameters.AddWithValue("@name", txtname.Text)
Cmd.ExecuteNonQuery()
conn.close
