2006-7-27 Sybase中的bug

这个问题是由Sybase ODBC驱动的bug引起的,官方文档记述如下:

  • 342554: ODBC: E_FAIL status with AddNew() and CursorLocation set
    to adUseClient in a Visual Basic ADO applciation. This is resolved
    by using the WorkArounds2=16 connection attribute. You can add this
    to the ADO connections string as "WA2=16". Another alternative is
    to add the "WorkArounds2=16" for the DSN as found in the registry
    under ODBC.INI.

解决方法也就如上面记述的一样:

  • 方法一
    • 创建连接的时候添加"WA2=16"参数,例子如下:
      • Dim cnn As ADODB.Connection

Set cnn = New ADODB.Connection
cnn.CursorLocation = adUseClient
cnn.Open ("DSN=jomosybase;UID=JOMOVB;PWD=123456;WA2=16")

用此连接创建的RecordSet和控件绑定进行数据更新操作可以正确执行。

  • 方法二
    • 在注册表中搜索:"ODBC.INI",找到Sybase对应的数据源,在该数据源下面添加一个文字列

键:WorkArounds2
值:16

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值