Select to view content in your preferred language

ASP.NET inserting using multi versioned view

1012
2
02-28-2011 05:19 AM
CherylGessele
New Contributor
Using an asp.net 4.0 web application and the Oracle.dataaccess dll 2.112.1.0, I am trying to insert a record into an Oracle database multi versioned view with the following statement:

begin
SDE.version_util.SET_CURRENT_VERSION('SDE.DEFAULT');
sde.version_user_ddl.edit_version('SDE.DEFAULT',1);
insert into electric.distributiontransformerunit_mv (CreationUser,etc,etc)
values (:CreationUser,:etc,:etc);
sde.version_user_ddl.edit_version('SDE.DEFAULT', 2);
end;

and am receiving the following error:
ORA-20176: State 1794237 from version SDE.DEFAULT is not closed.
ORA-06512: at "SDE.VERSION_USER_DDL", line 823
ORA-06512: at line 3

I am not very familiar with Oracle and am just trying to create a front end application for data located in the Oracle database.  Any thoughts would be greatly appreciated.
0 Kudos
2 Replies
anthonysanchez
Occasional Contributor
Hello,
it appears as if a previous attempt that failed has left that state open.  Try closing your edit session again and retry.  If it still doesn't work, close the state manually.

update sde.states set closing_Time=sysdate where state_id=1794237
commit;
0 Kudos
CherylGessele
New Contributor
Thanks so much!  That solved my problem.
0 Kudos