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.