SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: asp and sql

  1. #1
    SitePoint Addict certify's Avatar
    Join Date
    May 2001
    Location
    Malaysia
    Posts
    216
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    asp and sql

    my sql statement... select * from tbl_m_user-one

    and i'm having this two problems...
    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
    [Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.

    can u guys tell me what is going on?

    thanks....
    Your WebHosting Partner - RouterWebHost.com
    eXam SIMulation Software - ExamSim.net
    geeks forums -ProgrammingTutor.com
    BMWClub of Malaysia - BMWClub.com.my
    unofficial MU Fan Club coming soon - ManchesterUnited.com.my


  2. #2
    SitePoint Wizard big_al's Avatar
    Join Date
    May 2000
    Location
    Victoria, Australia
    Posts
    1,661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you double checked if if the tables name was spelt correctly?
    .NET Code Monkey

  3. #3
    SitePoint Addict certify's Avatar
    Join Date
    May 2001
    Location
    Malaysia
    Posts
    216
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah.... i double checked it... can the hyphen be the problem.... btw the database is in access....
    Your WebHosting Partner - RouterWebHost.com
    eXam SIMulation Software - ExamSim.net
    geeks forums -ProgrammingTutor.com
    BMWClub of Malaysia - BMWClub.com.my
    unofficial MU Fan Club coming soon - ManchesterUnited.com.my


  4. #4
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you post the code? That helps greatly.

  5. #5
    I have an opinion...
    Join Date
    Sep 2001
    Location
    Barrie, Ontario
    Posts
    324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Take out the hyphen. I can't say for sure that it is causing the problem, but it is the one thing that logic says doesn't belong in a table or column name, much like reserved words.
    Egotist: A person more interested in himself than in me.
    KodeKrash - Eidix - Barrie LUG

  6. #6
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Didn't read the the post right, lol.

    As kode said, and that should hopefully fix it.

  7. #7
    SitePoint Member
    Join Date
    Jun 2001
    Location
    kuala lumpur in malaysia
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    but, when i put square bracket around the tablename, i seen some examples doing that....

    select * from [tbl_m_user-one].... it work
    Helping you to get Certified!
    www.certifyexpress.com
    Ultimate Practice Exam!
    www.certifypro.com

  8. #8
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Opps, I knew that, should have suggested that, sorry

  9. #9
    I have an opinion...
    Join Date
    Sep 2001
    Location
    Barrie, Ontario
    Posts
    324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, that would fix it, as square brackets are used to encase a string with "bad" characters, just like in ASP, you can have variables with spaces in them, using square brackets. If you took out the hyphen, you wouldn't need the square brackets.
    Egotist: A person more interested in himself than in me.
    KodeKrash - Eidix - Barrie LUG


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •