ADO SQLServer dbGo 生成 EAccessViolation
我有一个程序在单线程中填充数据库。 我对所有查询使用一个连接。 这样我就可以在事务中运行它们了。
每一秒我都会收到一组必须输入到 SQL Server 2005 Express 中的新文件。
应用程序可能运行 24 到 36 小时,然后突然在查询中收到“EAccessViolation”。
该查询此时已被执行至少 24 * 60 * 60 次。
我不确定它是否也发生在没有参数的查询中,因为大多数查询(90%)都有参数。 它们是插入/更新或带有参数的选择。
当发生这种情况时,所有查询都会得到相同的 EAccessViolation,一段时间后我会得到 StackOverflow。
虽然代码的构造方式可以处理异常,并且下次代码运行应该不会出现问题。
事实上,这种情况发生在各种查询中(与以前的版本相比没有改变),唯一的变化是我们没有使用 BCB Builder 2007 中的 dbGo,而是使用 Cpp Builder 6.0 执行 ADO。
我认为它是 Windows 版本 MDAC(2.8) 或 CodeGear 的 de dbGo 中的某个软件。 事实上,在以前的版本(ADO BCB6.0)中我们没有遇到它,而现在(dbGO 和 BCB2007)我们遇到了它,这使得该部分非常可疑。
我希望有些人有一些好的想法,这可能是这一切的原因。
目前我无法在桌面上重现它。 我仍在尝试复制它,这肯定会提供更多信息。
我愿意接受建议。
问候
jvdn。
I have a program that is filling a DB in a single thread.
I Use one connection for all queries. Thats so i will be able to run them all in transactions.
Every second I get a new set of files that has to be entered into a SQL Server 2005 Express.
The Application can run for 24 to 36 hours and than suddenly get a "EAccessViolation" in a query.
This query is by then been executed for atleast 24 * 60 * 60 times.
I'm not shure if it also happens with querys without parameres because most of the queries (90%) has parameres. they are inserts/updates or select with a parameter(s).
when this occures all queries afterwards get the same EAccessViolation and after a while I get a StackOverflow.
While the code is constructed in sutch a manner that an exception will be handled and the next time the code should run without problems.
the fact that this is happening in varios queries (that did't change from the former version) with the only change that in stead of using dbGo from BCB Builder 2007 we did ADO with Cpp Builder 6.0.
I asume that it is someware in the Windows version MDAC(2.8) or in de dbGo from CodeGear. The fact that in the previous version (ADO BCB6.0)we did't run into it and now with (dbGO and BCB2007) we have is it making that part very suspicius.
I hope that some has some nice Ideas what could be the reason for all this.
At the moment I Can't reproduce it here on a desktop. I'm still trying to get it reproduced that will defibnitly give more info.
I'm open for suggestions.
regards
jvdn.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我怀疑驱动程序 - 尝试使用不同的驱动程序,看看是否可以隔离问题。 还尝试重写查询以使用不同的语法,也许您可以经常回收连接?
I would suspect the driver - try using a different one to see if the problem can be isolated. Also try to rewrite the query to use a different syntax, maybe you could recyle the connections every so often?