0

I'm using Visual Studio 2010 and MS Access 2007

I can't fix the error

when debugging, "Syntax error in Insert Into" is occurred but sql syntax is correct I'm new to vb.net and it would be grateful if anyone can give me a solution.

   Try
        Dim query As String = "INSERT INTO User([ID],[StudName],Address])VALUES('002','haerth','col')"
        Dim comLib As New OleDbCommand
        With comLib
            .CommandText = query
            .Connection = conLib
            .ExecuteNonQuery()
        End With
        MessageBox.Show("Added Successfully")
    Catch ex As OleDbException
        MessageBox.Show(ex.ToString)
    End Try

`

1 Answer 1

2

You have a bracket mismatch: Address]

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.