⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 错误信息:不能在 firehose 方式下启动事务.txt

📁 以电子书的形式收集了VB一些常见问题解决方法,可以很方便的查找自己需要解决的问题.对一些VB初学者很用.
💻 TXT
字号:
只 有 用 SQL语 句 执 行 数 据 库 操 作 才 能 使 用 事 务 处 理 。 请 参 阅 以 下 MSDN帮 助 ,另 外 , 只 有 用 SQL语 句 执 行 数 据 库 操 作 才 能 使 用 事 务 处 理 。 
    Tips for Working with Cursors 
    Some providers, such as SQL Server, implement a forward-scrolling, read-only (or 'firehose') cursor mode, meaning that they can efficiently retrieve data by keeping a connection open. When working with such providers, the connection could be blocked by another user's transaction. The following examples demonstrate scenarios 
    that result in errors. 
    dbConn.Open "DSN=SQLForum;UID=sa;PWD=;" 'Example 1 
    dbConn.BeginTrans 
    RS.Open "SELECT * FROM Message", dbConn 
    Set dbCmd.ActiveConnection = dbConn 
    Example 1: The problem is that the command object's ActiveConnection is being set to a connection that is forward-scrolling and in 'firehose' mode. This is the same connection involved in the batch mode. The error from the provider will only appear in the Err object, and it will return as unspecified. For example, with the ODBC 
    Provider, you will get "Unspecified error". 
    dbConn.Open "DSN=SQLForum;UID=sa;PWD=;" 'Example 2 
    RS.Open "SELECT * FROM Message", dbConn 
    dbConn.BeginTrans 
    Example 2: The problem here is that the connection is forward-scrolling and in firehose mode, so it cannot be put into transaction mode. The error returned in the Errors collection from the provider will indicate that it is operating in firehose mode, and can't work in transaction mode. For example, with the ODBC Provider against 
    Microsoft SQL Server, you will get the error "Cannot start transaction while in firehose mode". 
    dbConn.Open "DSN=SQLForum;UID=sa;PWD=;" 'Example 3 
    RS.Open "SELECT * FROM Message", dbConn 
    Set dbCmd.ActiveConnection = dbConn 
    dbConn.BeginTrans 
    Example 3: The problem here is that the connection is in forward-scrolling firehose mode, so it cannot also be involved in a batch mode. The error returned in the Errors collection from the provider will indicate that the transaction could not be started. For example, with the ODBC Provider against Microsoft SQL Server, you will get the error "Cannot start transaction because more than one hdbc is in use". 
<END>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -