Microsoft Visual Basic Runtime Error 80040e14 in ODBC-based Application

Asked By 0 points N/A Posted on -
qa-featured

Hi guys,

I am using ODBC canonical time functions TIMESTAMPADD and TIMESTAMPDIFF in a data modification query from in an ODBC-based client application. Following error occurs which causes the SQL batch to fail to compile and execute:

“Run-time error ‘-2147217900 (80040e14):

[Microsoft][ODBC SQL Server Driver][SQL Server] The name ‘#28’ is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.”

If anyone can help me in figuring out this issue, I will be highly grateful.

Thanks

SHARE
Answered By 0 points N/A #83923

Microsoft Visual Basic Runtime Error 80040e14 in ODBC-based Application

qa-featured

Hey,

I believe this error usually occurs when the values used as the DEFAULT column belongs to another column on the instance of table creation. I would recommend a few changes. These could include:

In the setting of the Default value of the column, I suggest that you make use of only variable, constants or expression that will not be used in any other column. Only system functions e.g. GETDATE () can be used as default values in that column. You should also try using a computed column as a replacement of the default values.

If you initial code had DEFAULT after [TotalAmount], you should change it to AS

Login/Register to Answer

Related Questions