CFF KB - Carrz-Fox-Fire Promotions Knowledge Base
CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.Knowledge Base
- Breadrumbs:
Microsoft OLE DB Provider for SQL Server (0x80040E14) Invalid column name '
- Article ID:
73 - Date Created
Monday, December 20, 2010 - Last Updated
Monday, December 20, 2010 - This Article Has been Viewed
2480 times - Short Desc
Migrating from Access Database to SQL Server takes a little time editing your code to work properly with the new database setup. - Details
When you migrate from Access Database to SQL Server, there are some things that have to be edited and changed along the way to make your ASP Pages rather ASP Classic or ASP.net to work and function with the new and better database system.
One of the things is the way you define a value in your Statement.
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Invalid column name 'Yes'.
/header.asp, line 208 - Recreate Issue
To recreate the issue;
<%
sqlGetSales.commandtext="SELECT CatID, SalCheck FROM SalesTable WHERE SaleCheck=Yes"
%>
The above SQL Statement is from an ASP page running from an Access Database.
As you can see, the<%.
SaleCheck=Yes
%> - Resolve Issue
To write the above scrip to work with SQL Server, you will need to wrap the value of Yes with single Quotes.
<%
sqlGetSales.commandtext="SELECT CatID, SalCheck FROM SalesTable WHERE SaleCheck='Yes'"
%>
As you can see, we have 'Yes' instead Yes which was used in Access Database Connection.
--------
Related Articles
Microsoft OLE DB Provider for SQL Server (0x80040E14) Incorrect syntax near the keyword 'off' or Incorrect syntax near the keyword 'on'«
Share With Friends (Updated 6-8-2010)
Recent Articles
All Topics
- Coming Soon - Knowledge Exchange
Trending Articles
- Microsoft VBScript runtime error '800a0046' Permission denied FileSystemObject 24695
- Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 21297
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19544
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 17785
- The backup set holds a backup of a database other than the existing 16826