Results 1 to 3 of 3

Thread: syntax error

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    323
    Microsoft JET Database Engine error '80040e14'

    Syntax error in FROM clause.

    /arthur/new1/observations/new.asp, line 16

    Code:
    Dim cnn
    Dim rst
    Dim ConnectString
    Dim strSQL
    
    Set cnn = Server.CreateObject("ADODB.Connection")
    Set rst = Server.CreateObject("ADODB.Recordset")
    			
    ConnectString = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\shared webs\art\new1\password\db\password.mdb"
    			
    cnn.Open ConnectString
    	
    strSQL = "Select * from password"
    			
    rst.Open strSQL, cnn
    If you think education is expensive, try ignorance.

  2. #2
    Guest
    this is my first shot on answering a question on SQl, so bare with me,
    but dont you need a semicolon at the end of the SQL statement??

    or maybe the tablename and database name need to be different??


  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    323
    I went to http://www.microsoft.com and searched for the error message and it gave me the answer. It might help someone here so I'll explain what I had to do.

    The error means I'm using a word for the table which is considered a "special" word (or something like that). I had to either change the name of the table or put [] around it in the sql statement.

    The final strSQL looked like this and it worked...

    Code:
    strSQL = "SELECT * FROM [password]"
    If you think education is expensive, try ignorance.

Posting Permissions

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



Click Here to Expand Forum to Full Width