[fdo-users] autocad 2011 commit changes problem
greg.boone at autodesk.com
Fri Mar 18 11:22:28 EDT 2011
We have a unit test that successfully inserts into a table with a trigger but I suspect that our trigger is much simpler than the one that you are using. It might be worthwhile if you could determine what part of the trigger body generates the invalid cursor state.
One thing to worry about is if the dynamic cursor has more performance overhead. I don't know if it does, but something to look into.
From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of vasjalebar
Sent: Thursday, March 17, 2011 7:02 AM
To: fdo-users at lists.osgeo.org
Subject: [fdo-users] autocad 2011 commit changes problem
I have developed an application that synchronizes SQL tables (mssql 2008 R2) over WCF (using MS sync framework 2.1). This application requires triggers (insert, update and delete) on tables one wishes to synchronize. And this causes a problem. If I want to commit more than one change (insert, update or delete) in Autocad 2011 the FDO provider (ms sql spatial) throws this
- 1= Failed to insert feature.
- 2 = RDBMS: [Microsoft][ODBC SQL Server Driver]Neveljavno stanje kazalke.*
- 3 = RDBMS: [Microsoft][ODBC SQL Server Driver]Neveljavno stanje kazalke.* Feature was not processed becouse operation has been terminated prematurely.
(2 consecutive occurrences)
* this is an error in slovene and it means something like "Invalid state of the cursor"
If I disable the trigger, commit works, but if the trigger is enabled I always get this error (if I commit more than one change). The code behind the insert trigger (tried it just for this example) is:
CREATE TRIGGER [dbo].[trg_insert]
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for trigger here
The triggers I use in the application is a bit more complicated and are a bit to long :)
The next thing I checked was the code of fdo provider. I found that the provider uses SQL_CURSOR_STATIC (in Providers\GenericRdbms\Src\ODBCDriver\connect.c).
So my question is what if I change SQL_CURSOR_STATIC to SQL_CURSOR_DYNAMIC?
Is this the right approach for this problem??? And if anyone wants to know, I HAVE TO USE TRIGGERS :)
View this message in context: http://osgeo-org.1803224.n2.nabble.com/autocad-2011-commit-changes-problem-tp6180452p6180452.html
Sent from the FDO Users mailing list archive at Nabble.com.
fdo-users mailing list
fdo-users at lists.osgeo.org
More information about the fdo-users