Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Excel issue using adLockBatchOptimistic - Cursor not open

10 views
Skip to first unread message

golg...@yahoo.com

unread,
Jul 24, 2013, 10:57:07 AM7/24/13
to
Hello VBA experts

I know this question is more related to the Database, but perhaps someone has seen this issue before.

I have a spreadsheet that connects to Sybase IQ. Two different methods to connect are used:


1. rsData.Open "select top 100 * from test_ado ", IQCONNECT, adOpenStatic, adLockReadOnly
2. rsData.Open "select top 100 * from test_ado ", IQCONNECT, adOpenStatic, adLockBatchOptimistic


My test table is create table dbo.test_ado ( char1 char(1) NOT NULL ).

insert into test_ado values ('a')
go 100

IQ 15.1 ESD 3
Methods 1,2 work

In IQ 15.4 ESD 3
Method 1 Works
Method 2 returns the following error:

run-time error '-2147467259 (80004005)
[Sybase][ODBC Driver][Sybase IQ]Cusor not open

I have tried updating my odbc driver to the latest one: (12.00.01.3027) I and still get the open cursor error when I try to use adLockBatchOptimistic

I have tried setting force_no_scroll_cursors = 'OFF'

I did open a case with Sybase but they cannot repro my issue.

Our 15.4 install is standard with no new settings except minimized storage and force_no_scroll_cursors. The runtime kind of looks like an overflow to me

If anyone has some ideas I would appreciate the help. These connection methods are used all over the place and I cannot ask for them to remove the adLockBatchOptimistic option even if it is incorrectly used.

Thanks in advance
0 new messages