Syntax error with Access database

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I fill a dataset (dsGRAD) using the Jet 4.0 provider and the OleDbDataAdapter with data from an Access database table containing 19 columns. Each column is bound to a textbox on a form. Changes can be made to the dataset text boxes with no problems but I get a syntax error attempting to update or insert into a Access database. I have not yet attempted a Delete operation.

The code I am using follows:

Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click

        Try
            daGRAD.Update(dsGRAD, "GRADUATE")  (error on this line)
        Catch ex As Exception
            MessageBox.Show(ex.ToString)
        End Try
        bLoading = True
        dsGRAD.GRADUATE.Clear()
        daGRAD.Fill(dsGRAD, "GRADUATE")
        bLoading = False
        txtClass.Focus()
    End Sub

I am using the generated insert, delete, update commands provided when the data adapter is generated.

The syntax error generated is identical to the error message mentioned in the message from Dustin Wilson dated 12 Aug 2005 to this group with the exception of the different names and locations of the database.

Words of wisdom would be greatly appreciated
Thanks
Don G
.



Relevant Pages

  • Re: Syntax error with dates
    ... I think the problem lies with the date format in the input field. ... links to an access database. ... response to the effect there is a syntax error in the date. ...
    (microsoft.public.inetserver.asp.db)
  • Re: syntax error connecting database
    ... access database, but i keep getting the following error: ... Syntax error in INSERT INTO statement. ... ' A Function to check if some field entered by user is empty ... Password is a reserved word in Jet SQL. ...
    (microsoft.public.inetserver.asp.db)
  • How to use INSERT INTO Statement in MS Access Database
    ... I have a table (Wares) in MS Access database with defined field - type ... but I receive an error "Syntax error in INSERT INTO statament..." ... I've tried to use also PreparedStatement object with ...
    (comp.lang.java.help)
  • Changing the default value of a column in Access using a SQL query
    ... I am working on a VC++ Windows application that uses an Access database as a ... backend. ... I get 'Syntax error in CONSTRAINT clause' and the keyword DEFAULT ...
    (microsoft.public.access.queries)
  • Re: Security exception while opening an OleDBConnection
    ... CyberLotus have you given it the right permissions? ... and i posted a similar solution for MS access database. ... Security Exception. ...
    (microsoft.public.dotnet.framework.aspnet.security)