04-03-14, 05:29 PM
السلام عليكم
هذا الكود
Cnn = New SqlConnection(CnnString)
Cmd = New SqlCommand
Cnn.Open()
Cmd = New SqlCommand("addhadad", Cnn)
Cmd.CommandType = CommandType.StoredProcedure
Cmd.Parameters.AddWithValue("@nhadad", TextBox1.Text)
Try
'Cnn.Open()
If Cmd.ExecuteNonQuery > 0 Then
MsgBox("تم الحفظ")
Cnn.Close()
Else
MsgBox("لم يتم")
End If
Catch ex As Exception
MsgBox("no")
End Try
هذا الكود
Cnn = New SqlConnection(CnnString)
Cmd = New SqlCommand
Cnn.Open()
Cmd = New SqlCommand("addhadad", Cnn)
Cmd.CommandType = CommandType.StoredProcedure
Cmd.Parameters.AddWithValue("@nhadad", TextBox1.Text)
Try
'Cnn.Open()
If Cmd.ExecuteNonQuery > 0 Then
MsgBox("تم الحفظ")
Cnn.Close()
Else
MsgBox("لم يتم")
End If
Catch ex As Exception
MsgBox("no")
End Try