R: [fdo-users] autocad 2011 commit changes problem

quagliamichele at tiscali.it quagliamichele at tiscali.it
Fri Mar 18 03:07:10 EDT 2011


In italiano 
grazie 

----Messaggio originale----
Da: vasjalebar at gmail.
com
Data: 17/03/2011 12.01
A: <fdo-users at lists.osgeo.org>
Ogg: [fdo-
users] autocad 2011 commit changes problem

Hi,
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
error:
- 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]
   ON  [dbo].[oc]
   AFTER insert
AS 
BEGIN
	-- SET 
NOCOUNT ON added to prevent extra result sets from
	-- interfering with 
SELECT statements.
	SET NOCOUNT ON;
	SELECT 1;
    -- Insert statements 
for trigger here

END

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 :)

Best regards,
Vasja 
Lebar



--
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
http://lists.osgeo.org/mailman/listinfo/fdo-
users





Supera i limiti: raddoppia la velocità da 10 a 20 Mega! 

Risparmia con Tutto Incluso: telefono + adsl 20 mega a soli 29,95 € al mese per due anni!

SCONTO DI 240 EURO!

http://abbonati.tiscali.it/telefono-adsl/prodotti/tc/tuttoincluso/?WT.mc_id=01fw


More information about the fdo-users mailing list