MSSQL数据库不能手动创建新的连接
来源:优易学  2011-9-13 8:26:29   【优易学:中国教育考试门户网】   资料下载   IT书店

  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".

上一页  [1] [2] 

责任编辑:小草

文章搜索:
 相关文章
热点资讯
热门课程培训