02-10-16, 02:54 PM
ارجو المساعدة .. انا جديد على الدوت نت وأتمنى اني استمر عليه ...
Try
Dim datt As String = Format(dt1.Value.Date.Ticks, "dd/mm/yyyy")
Dim InsertCommand As New SqlCommand
InsertCommand.Connection = Class1.cn
InsertCommand.CommandType = CommandType.Text
InsertCommand.CommandText = "INSERT INTO sanf(cod,na,wehd,ser_sh,ser_be,expir,sou_qantry,qmpn,qamp_in,waqil) VALUES('" + TextBox3.Text + "','" + TextBox4.Text + "','" + ComboBox1.Text + "','" & TextBox5.Text & "','" & TextBox6.Text & "', " & dt1.Value.Date & " ,'" + TextBox7.Text + "','" + TextBox8.Text + "','" + TextBox9.Text + "','" + TextBox10.Text + "');"
InsertCommand.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub