ADO-Access Syntax error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chriz Yuen

    ADO-Access Syntax error

    Private Sub Form_Load()
    Adodc1.Recordse t.Close
    Adodc1.Recordse t.Source = "select * from user"
    Adodc1.Recordse t.Open
    Set DataGrid1.DataS ource = Adodc1
    DataGrid1.ReBin d
    End Sub

    When i run the program it show me msgbox
    Run-time error '-2147217900 (8004Je14)':
    [Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.

    Thanks for help
    Chriz


  • Veign

    #2
    Re: ADO-Access Syntax error

    User is a reserved word.

    Try
    Adodc1.Recordse t.Source = "select * from [user]"

    --
    Chris Hanscom - Microsoft MVP (VB)
    Veign, Columbia. 118 likes. A South Carolina development company whose primary focus is to leverage the power of machine learning to better understand your data. From image and object detection to...

    --

    "Chriz Yuen" <chrizyuen@unix .cx> wrote in message
    news:418edeb1$1 _2@news.tm.net. my...[color=blue]
    > Private Sub Form_Load()
    > Adodc1.Recordse t.Close
    > Adodc1.Recordse t.Source = "select * from user"
    > Adodc1.Recordse t.Open
    > Set DataGrid1.DataS ource = Adodc1
    > DataGrid1.ReBin d
    > End Sub
    >
    > When i run the program it show me msgbox
    > Run-time error '-2147217900 (8004Je14)':
    > [Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.
    >
    > Thanks for help
    > Chriz
    >
    >[/color]


    Comment

    Working...