gibra ha scritto:
Scusa, ma che comando è:
objCommand.CommandText = "Inserisci lettera"
?
Ho corretto quella parte non centrava nulla
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Dim A As String
Dim objConnection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=C:\Users\Dominik\Documents\Database3.mdb") ' & "Persist Security Info=False")
Dim objCommand As OleDbCommand = New OleDbCommand
objConnection.Open()
objCommand.Connection = objConnection
objCommand.CommandText = "(A, B, C, D, E, F, G, H, I, L, M, N, O, P, Q, R, S, T, U, V, Z, J, K, W, X, Y, Z)" &
"VALUES(@A, @B, @C, @D, @E, @F, @G, @H, @I, @L, @M, @N, @O, @P, @Q, @R, @S, @T, @U, @V, @Z, @J, @K, @W, @X, @Y, @Z)"
A = "Pippo"
objCommand.Parameters.AddWithValue("@A", TextBox3.Text)
objCommand.Parameters.AddWithValue("@B", A)
Try
objCommand.ExecuteNonQuery()
Catch oleDbExceptionErr As OleDbException
End Try
objConnection.Close()
'SCRITTURA SULLE CASELLE
End Sub