1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| Sub butvalid_Click(sender As Object, e As EventArgs)
Dim oConnection As System.Data.SqlClient.SqlConnection
oConnection = New System.Data.SqlClient.SqlConnection
oConnection.ConnectionString = "Server=(local); Initial Catalog='intervention';" _
& " Trusted_Connection=True;"
oConnection.Open()
Dim oCommand As System.Data.SqlClient.SqlCommand
Dim sSQL As String
sSQL = "INSERT INTO [demande](site,service,date_dem,delai_dem,nature,objet,detail,observation,etat)" _
& " VALUES('" & ddlsite.SelectedItem.Text & "','" & ddlservice.SelectedItem.Text & "','" & Labelcal.Text & "','" & tbdelai.Text & "','" & ddlplatef.SelectedItem.Text & "','"& taobjet.Text & "','" & tadetail.Text & "','" & taobservation.Text & "','" & labetat.Text & "')"
oCommand = New System.Data.SqlClient.SqlCommand(sSQL,oConnection)
oCommand.ExecuteNonQuery()
oConnection.Close()
End Sub |
Partager