设置ODBC超时值 [英] Set ODBC timeout value

查看:901
本文介绍了设置ODBC超时值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用VB构建的查询。它接受我从表单传入的参数并将记录插入表中。我遇到的问题是我输入的一些值导致查询超时。我需要知道如何设置ODBC超时值,以便我的查询运行。我的查询文本列在下面

I have a query that I built using VB. It takes parameters that I pass in from a form and inserts records into a table. The problem I have is some of the values I enter cause the query to timeout. I need to know how to set the ODBC timeout value so my query will run. My query text is listed below

展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号

推荐答案

首先:
展开 | 选择 | Wrap | 行号


好问题!


你猜对了。这意味着我从来没有找到解决方案:(


我找到了控制交易使用的选项,但没有超时设置。


还有另一种执行动作查询的方法(不是简单的SQL我很害怕)但是这也没有引用超时。它正在调用 QueryDef.Execute ,甚至 CurrentDb .Execute(" QueryName")


阅读MS的这篇文章,解释如何使用ODBC加速连接。它专门讨论Access和MS SQL服务器但是这个想法适用于所有数据库。


特别注意如何通过更改注册表来跟踪ODBC流量。这将让您了解正在发生的事情。

http://msdn.microsoft.com/en- us / library / bb188204.aspx

设置ODBC超时请参阅以下内容

http://support.microsoft.com/kb/153756


另外看看Begin Tran和Commit Tran是否有帮助。


欢呼,
Read this article by MS that explains how to speed up connection using ODBC. It specifically talks about Access and MS SQL server but the idea works for all databases.

Pay particular attention on how to trace ODBC traffic by changing the Registry. This will give you an idea of what is going on.

http://msdn.microsoft.com/en-us/library/bb188204.aspx

For setting ODBC timeouts see the following

http://support.microsoft.com/kb/153756

Also see if Begin Tran and Commit Tran helps.

cheers,


这篇关于设置ODBC超时值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆