1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Dim connString As String = "Data Source='Program
Files\Inventaire_Etat\DBinventaire.sdf';Password='0000'; Encrypt = TRUE;"
Dim SQLCNX As New SqlCeConnection(connString)
SQLCNX.Open()
Try
Dim SSQL6 As String = "INSERT INTO UTILISATEUR (ID_UTIL ,MOT_PASS ) VALUES ('" & TextBox1.Text & "','" & TextBox1.Text & "')"
Dim SQLCOMMAND5 As New SqlCeCommand(SSQL6, SQLCNX)
SQLCOMMAND5.Prepare()
SQLCOMMAND5.ExecuteNonQuery()
Catch ex As Exception
MessageBox.Show(ex.message)
End Try
SQLCNX.Close() |
Partager