Syntax error in FROM clause???

Results 1 to 3 of 3

Thread: Syntax error in FROM clause???

  1. #1
    Whsiao Guest

    Default Syntax error in FROM clause???

    Hi,<BR> I got an error message as follow:Error Type:<BR>Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)<BR>[Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause, when I run the following code:<BR>//Open database connection<BR>Dim objConn<BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR>objConn .ConnectionString = "DSN=mcitest"<BR>objConn.Open<BR> <BR>//Open recordset<BR>Dim objRS, SQL<BR>SQL = "SELECT * FROM address WHERE f_name = &#039;William&#039;" <BR>Set objRS = Server.CreateObject("ADODB.Recordset")<BR>objRS.Op en SQL, objConn,0 ,1 ,2<BR><BR>Can someone help me figure out what I did wrong.... I am pretty sure the SQL statement is correct...<BR>Thanks in advance!!

  2. #2
    Join Date
    Dec 1969

    Default RE: Syntax error in FROM clause???

    OK. is the column name right? have you tried changing the table name in case it&#039;s a reserved word? apart from that it looks OK

  3. #3
    Whsiao Guest

    Default RE: Syntax error in FROM clause???

    I found out that it was due to the parameters in the line objRS.Open SQL, objConn; but I am not sure what would be the correct parameters.<BR><BR>Thanks

Posting Permissions

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