View Single Post
  #1 (permalink)  
Old January 10th, 2013, 06:51 PM
LadyHawke LadyHawke is offline
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Location: California
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Incorrect syntax near 'AutoresponderID'

I am still learning Classic ASP and SQL. I am trying to import data from a CSV file into a SQL 2005 table. The ASP page works fine until I try to upload the file. When I upload the file the first row of data is seen and held in the record set and then it produces this error message:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'AutoresponderID'.

/admin/Spitfire/Import1SCExportFiles/ImportAutoresponderList.asp, line 107

I know the error is not in the ASP page as another import routine uses this same code with only the variable names being different AND because AutoresponderID is not mentioned in the ASP.
AutoresponderID is a field name in the SQL table and is mentioned in the stored procedure.
Where is the syntax error? Here is the stored procedure:

Code:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[ImportAutoresponderIDList_Insert]
 @FileName varchar(255)
 , @AutoresponderID int
 , @AutoresponderName varchar(255)
AS
BEGIN
	SET NOCOUNT ON

	INSERT INTO ImportAutoresponderIDList
	(
	 [FileName]
	 , [AutoresponderID]
	 , [AutoresponderName]
	)
	SELECT
	 @FileName
	 , @AutoresponderID
	 , @AutoresponderName
END
Thank you for your help.

Last edited by LadyHawke; January 10th, 2013 at 06:55 PM.
Reply With Quote