I'm trying to insert the name of an image that I upload with Coldfusion to SQL 7.0 Server. When I output the filename in HTML, the name comes out right, but when I try to insert that name in the database, I get this error. The Image field is set at varchar at 50 in lenght.
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC SQL Server Driver][SQL Server]The name 'jpg' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (12:1) to (12:131).
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC SQL Server Driver][SQL Server]The name 'jpg' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (12:1) to (12:131).