Syntax error

Results 1 to 2 of 2

Thread: Syntax error

  1. #1
    Join Date
    Dec 1969

    Default Syntax error

    I still could not solved this. Please somebody help me!!!!<BR><BR> for i = 1 To 10 <BR><BR> <BR>SQL3 ="INSERT INTO tblmembers(project_id, member_name, status, department)" <BR>SQL3 = SQL3& "VALUES("<BR>SQL3 = SQL3& "" &ID & ","<BR>SQL3 = SQL3& "&#039;"&Request.Form("member_"&(i))& "&#039;," <BR>SQL3 = SQL3& "&#039;"&Request.Form("status_"&(i))& "&#039;," <BR>SQL3 = SQL3& "&#039;" &Request.Form("dept_"&(i))& "&#039;,"<BR>SQL3 = SQL3& ")" <BR><BR>objConn.Execute SQL3 <BR>Next <BR><BR><BR>Error Type:<BR>Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)<BR>[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near &#039;)&#039;.<BR><BR>Any help would be highly appreciated. THANKS.

  2. #2
    Join Date
    Dec 1969

    Default RE: Syntax error

    You got a stray comma at the end there Cochise...<BR><BR>You should always Response.Write out your SQL statement... you&#039;d probably would&#039;ve seen that right away.

Posting Permissions

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