Ik ben echt totale noob in programmaren maar ik wil graag mijn software tool samen willen laten werken met een Database die gebaseerd is op Access
Ik ben al 3 dagen bezig met tutorials ed. maar ik kom er niet uit.
Tenminste mijn script zegt dat er iets wordt toegevoegd maar dat gebeurd niet.
Dit is mijn script:
Zou iemand mij een zetje in de goede richting willen geven ?
Ik ben al 3 dagen bezig met tutorials ed. maar ik kom er niet uit.
Tenminste mijn script zegt dat er iets wordt toegevoegd maar dat gebeurd niet.
Dit is mijn script:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| Public Sub InsertRow(ByVal myConnectionString As String)
' If the connection string is null, use a default.
If myConnectionString = "" Then
myConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=products.accdb;"
End If
Dim myConnection As New OleDbConnection(myConnectionString)
Dim myInsertQuery As String = "INSERT INTO positioners (Product_Name, Gemaakt, Miliseconde, TCL_Name) VALUES ('hallo',0,1,'test')"
Dim myCommand As New OleDbCommand(myInsertQuery)
myCommand.Connection = myConnection
myConnection.Open()
myCommand.ExecuteNonQuery()
myCommand.Connection.Close()
MsgBox("added")
End Sub |
Zou iemand mij een zetje in de goede richting willen geven ?
^ Post is hierboven!