简体   繁体   English

Microsoft OLE DB提供程序的ODBC驱动程序错误'80040e07'

[英]Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

Oké this one will probably be verry obvious but after 3 days looking at the same block of code to find the mistake i start loosing my mind over it. 好吧,这可能很明显,但是经过三天的时间在同一段代码中查找错误后,我开始对此感到迷惑。

Below 2 blocks of code. 以下2个代码块。 The 1st one works like a charm but the second one although i assume it's correctly coded keeps giving me issues. 第一个工作起来就像一种魅力,但是第二个虽然我认为编码正确,但仍然给我带来麻烦。

SQL = "EXECUTE sp_AddEvent '" &_
chrEventName & "','" &_
chrEventManager & "','" &_
chrEventAssistant & "','" &_
txtEventDescr & "','" &_
intEventTypeID & "'," &_
intEventCatagoryID & "," &_
intIncomeModelID & "," &_
intEventStatusID & ",'" &_
dtEventStart & "','" &_
dtEventEnd & "','" &_
intMultiArea & "'," &_
intMultiLokation & "," &_
intMultiDay & ",'" &_
dtEventAdded & "','" &_
dtEventChanged & "','" &_
intEventLastChangedBy & "'"

'   Executing Insert statement.
SET rsAddEvent = someconnection.EXECUTE(SQL)

Now the second block which is driving me to complete madness by now. 现在,第二个街区正在驱使我彻底疯狂。

SQL = "EXECUTE sp_AddLokation '" &_
chrLokationName & "','" &_
chrLokationStreet & "','" &_
chrLokationCity & "','" &_
chrLokationCountry & "','" &_
chrLokationSNumber & "','" &_
chrLocationZipcode & "','" &_
chrLokationPhone & "','" &_
chrLokationFax & "','" &_
chrLokationEmail & "','" &_
chrLokationWebsite & "','" &_
intLokationTypeID & "'," &_
intMultiArea & "," &_
intLokationStatusID & ",'" &_
dtLokationAdded & "','" &_
dtLokationChanged & "','" &_
intLastChangedBy & "'"

'   Executing Insert statement.
SET rsAddLokation = someconnection.EXECUTE(SQL)

the stored procedure which is called to insert the data is working fine so it has to be something at ASP level. 存储过程被调用以插入数据可以正常工作,因此它必须是ASP级别的东西。

Does anyone has an suggestion to this weirdness before i start chewing on my keyboard? 在我开始咀嚼键盘之前,有人对这种怪异有什么建议吗?

In addition: I either get an varchar to int conversion error or when fiddling with the ' in one of the last 3 int fields before dtlokationAdded i get an syntax error near (depending on the by fiddling affected field) 另外:我收到varchar到int的转换错误,或者在dtlokation之前的最后3个int字段之一中摆弄'时,我得到了附近的语法错误(取决于对受影响字段的摆弄)

Assuming all fields that starts with int are numeric (Except intLastChangedBy , which in the previous block is enclosed in quotes; if it is, remove that quote too): 假设所有以int开头的字段都是数字(除了intLastChangedBy ,它在上一个块intLastChangedBy引号引起来;如果是,则也删除该引号):

SQL = "EXECUTE sp_AddLokation '" &_
chrLokationName & "','" &_
chrLokationStreet & "','" &_
chrLokationCity & "','" &_
chrLokationCountry & "','" &_
chrLokationSNumber & "','" &_
chrLocationZipcode & "','" &_
chrLokationPhone & "','" &_
chrLokationFax & "','" &_
chrLokationEmail & "','" &_
chrLokationWebsite & "'," &_
intLokationTypeID & "," &_
intMultiArea & "," &_
intLokationStatusID & ",'" &_
dtLokationAdded & "','" &_
dtLokationChanged & "','" &_
intLastChangedBy & "'"
intLokationTypeID & "'," &_

Well, I noticed here you have a set of quotation marks but only one apostraphe... that could be causing an error? 好吧,我注意到这里您有一组引号,但是只有一个撇号...可能会导致错误? Or, wait, I think I see where you closed it. 或者,等等,我想我知道您在哪里关闭了它。 (couple lines down, sorry!) (夫妇排队下来,对不起!)

Ok, thanks all for trying to help me out here! 好的,谢谢大家在这里帮助我!

It seems my issue is resolved. 看来我的问题已解决。 It must be code-midgets who payed me a visit last night. 昨晚拜访过我的一定是代码侏儒。 Other than that i can't explain what just happened. 除此之外,我无法解释刚刚发生的事情。 Cause when i left the project yesterday it sure as hell wasn't working at all. 因为当我昨天离开该项目时,可以确定地狱根本没用。

暂无
暂无

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

相关问题 Microsoft OLE DB提供程序的SQL Server错误'80040e07' - Microsoft OLE DB Provider for SQL Server error '80040e07' SQL Server的Microsoft OLE DB提供程序错误'80040e14'无效的列名。 SQL查询 - Microsoft OLE DB Provider for SQL Server error '80040e14' Invalid column name . SQL query ASP经典应用使用Azure SQL服务器时,Microsoft OLE DB Provider for ODBC Drivers错误'80004005' - Microsoft OLE DB Provider for ODBC Drivers error '80004005' when asp classic app use azure sql server 错误:“OLE DB提供程序”MSDASQL“用于链接服务器”(null)“返回消息”[Microsoft] [ODBC驱动程序管理器]未找到数据源名称...“ - Error: “OLE DB provider ”MSDASQL“ for linked server ”(null)“ returned message ”[Microsoft][ODBC Driver Manager] Data source name not found …" Microsoft OLE DB Provider for SQL Server错误'80004005' - Microsoft OLE DB Provider for SQL Server error '80004005' 链接服务器“(null)”的 OLE DB 提供程序“Microsoft.Jet.OLEDB.4.0”报告错误 - The OLE DB provider “Microsoft.Jet.OLEDB.4.0” for linked server “(null)” reported an error OLE DB提供程序“ MSDASQL”报告了错误 - OLE DB provider 'MSDASQL' reported an error 问题OLE DB提供程序 - Probleme OLE DB provider OLE DB / ODBC错误:没有为一个或多个必需参数提供值 - OLE DB / ODBC error: no value given for one or more required parameters 链接服务器“(null)”的 OLE DB 提供程序“Microsoft.ACE.OLEDB.12.0”返回消息“JOIN 操作中的语法错误”。 - OLE DB provider “Microsoft.ACE.OLEDB.12.0” for linked server “(null)” returned message “Syntax error in JOIN operation.”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM