简体   繁体   English

SQL Server的Microsoft OLE DB提供程序错误'80040e14'无效的列名。 SQL查询

[英]Microsoft OLE DB Provider for SQL Server error '80040e14' Invalid column name . SQL query

Hi I have having this error message 嗨,我有此错误消息

Microsoft OLE DB Provider for SQL Server error '80040e14' Microsoft OLE DB提供程序的SQL Server错误'80040e14'

Invalid column name 'gonzalez'. 无效的列名“ gonzalez”。

When I try to run this query I just made. 当我尝试运行此查询时,我刚刚进行了查询。 This website has a search box that I type in that searches all the last names in corporate directory. 我在该网站上输入搜索框,该搜索框搜索公司目录中的所有姓氏。

    SecurityQuery = "SELECT * FROM dbCorpDir.dbo.vwEmployees WHERE sn like '" & FormatDBTextSearch(Last_Name) & "' ORDER BY sn;"

this works fine in SSMS 这在SSMS中工作正常

    SELECT * FROM dbCorpDir.dbo.vwEmployees WHERE sn like 'gonzalez' ORDER BY sn;

Ok guys just for future reference I will post what I found.I removed the single quotes. 好的,仅供参考,我将发布我发现的内容。我删除了单引号。 But I needed to rename the output fields to the column names of the new database.(DUH)! 但是我需要将输出字段重命名为新数据库的列名。 I kept relying on the debugger telling me what line the error was on and it was wrong. 我一直依靠调试器告诉我错误在哪一行,那是错误的。 Thanks again for all the help. 再次感谢您提供的所有帮助。

   SecurityQuery = "SELECT * FROM dbCorpDir.dbo.vwEmployees WHERE sn like " & FormatDBTextSearch(Last_Name) & " ORDER BY sn;"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SQL Server错误'80040e14'列名不明确 - SQL Server error '80040e14' Ambiguous column name Microsoft OLE DB提供程序的SQL Server错误'80040e07' - Microsoft OLE DB Provider for SQL Server error '80040e07' 经典ASP Microsoft SQL Server本机客户端11.0错误'80040e14'用户登录失败,但不是我指定的用户登录 - Classic ASP Microsoft SQL Server Native Client 11.0 error '80040e14' Login failed for user, but not the one I specified 具有多个Insert语句的SQL Compact错误80040E14 - SQL Compact Error 80040E14 with multiple Insert statement SQL Server错误“ 80040e14”,语法错误在“ ORDER”附近 - SQL Server error '80040e14' with syntax error nearby “ORDER” 尝试从 SQL Server 检索数据时出现 VBA ADODB 错误 (80040e14) - VBA ADODB error (80040e14) when trying to retrieve data from SQL Server VBA中SQL查询表达式中的运行时错误'-2147217900(80040e14)'语法错误(缺少运算符) - Run-time error '-2147217900 (80040e14)' sytax error (missing operatory) in SQL query expression in VBA 迁移问题:ASP经典应用程序中的错误“ 80040e14”从Windows Server 2003 / SQL Server 2000迁移到Windows Server 2008 R2 / SQL Server 2012 - Migration Issue: error '80040e14' in ASP classic application from Windows server 2003/SQL Server 2000 to Windows Server 2008 R2/SQL Server 2012 Microsoft OLE DB Provider for SQL Server错误'80004005' - Microsoft OLE DB Provider for SQL Server error '80004005' Microsoft OLE DB提供程序的ODBC驱动程序错误'80040e07' - Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM