Extract on ODBC Sql Server

Started by Jeffrey Ferreira, August 22, 2018, 02:45:52 PM

Previous topic - Next topic

Jeffrey Ferreira

I was opening up a MS SQL Server table with [ODB].
Out of habit I tried to do an extract before writing a record and I received the following error:
msg(-1) = for update clause allowed only for declare cursor.
Does anyone have any idea what this is?
I ended up just doing a read/write and that worked.
Should I not bother with EXTRACTS on [ODB]SQL

Mike King

What are your [ODBC] configuration settings in the system INI file and what options do you have in the OPEN for the connection?
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Devon Austen

Likely you need "CONCURRENCY=LOCK" and "EXTROPT=(UPDLOCK)" in the open options or in the [ODBC] INI section. You can put it in the INI if all of your ODB opens will be to a MS SQL db if not use the open options on the [odb] open to the MS SQL db.
Principal Software Engineer for PVX Plus Technologies LTD.

Jeffrey Ferreira

Devon,

I'm sorry I was just about to update my post.
A co-worker had me add:

[ODBC]
NONULLS=P
EXTROPT=$ FOR UPDATE

into the ini file and it works now.

jeff