Welcome to ESRI Blogs

Three new How-To articles in Geodatabase SDK

For all geodatabase developers out there, we’ve added three new how-to articles to the online SDK:

 

 How to use edit sessions: The in’s and out’s of editing a geodatabase are explained in this article, and supported with several code examples. It includes an introductory section on the basics of edit sessions and edit operations, useful patterns such as how to handle errors that occur while editing, and information about handling more advanced scenarios, like how to reconcile changes at the end of an edit session after the version has been redefined.

 

How to query geodatabase properties: This article discusses how to use several interfaces in the Geodatabase API that allow developers to query geodatabases for properties such as whether or not certain functionality is supported, what release the geodatabase is, and supported configuration keywords.

 

How to work with rules and validation: The application of attribute, connectivity and relationship rules are discussed in this article, along with an overview of programmatic validation.
Published Monday, October 20, 2008 8:50 AM by brentardenpierce
Filed under: , ,

Comments

# Is it possible to determine whether you are connected as ArcSDE administrator?

Very interesting and useful articles, thanks.

I have a question in the realm of the second article that I hope you can answer for me.

I'm developing a custom ArcCatalog command which works on the ArcSDE connection the user has selected.

Is it possible to programatically determine whether the selected connection are connected as the ArcSDE administrator? This is necessary for this command since it needs access to all versions in the geodatabase, including private ones.

Saturday, November 29, 2008 2:25 PM by mahj

# re: Three new How-To articles in Geodatabase SDK

Good question, you would have to check the current connected user. We added an interface at 9.2 to allow developers to do this. You can user the IDatabaseConnectionInfo2::ConnectedUser property to return this value.

http://resources.esri.com/help/9.3/ArcGISDesktop/ArcObjects/esriGeoDatabase/IDatabaseConnectionInfo_ConnectedUser.htm

Tuesday, December 02, 2008 10:45 AM by brentardenpierce

# re: Three new How-To articles in Geodatabase SDK

Thanks for your answer, but it doesn't really help me. I know about the ConnectedUser property (which was already on the older IDatabaseConnectionInfo interface I think) and I use it in the command to ask the user if the connected user is the ArcSDE administrator, but what I really would want to do is programatically determine if the connected user is an ArcSDE administrator, without having to ask the user.

The user might just have been given a connection file by the ArcSDE administrator to use with this command and don't know the name of the ArcSDE administrative account.

Thursday, December 04, 2008 1:29 PM by mahj

# re: Three new How-To articles in Geodatabase SDK

Unfortunately, there is no direct way through ArcObjects to determine if the user is an SDE Administrator. This is definitely something we can look into adding at a future release.

Typically the SDE administrator is the SDE user. There are two places where this could be different

1. On SQL Server the administrator can be either SDE or DBO user.

2. Using Oracle Project Instance where the SDE Administrator will be the database user that creates the project instance.

With this in mind, you could compare the value returned from the ::ConnectedUser property with a expected value to determine if the user is a administrator.

Friday, December 05, 2008 1:47 PM by brentardenpierce

# re: Three new How-To articles in Geodatabase SDK

It would be very useful if such functionality would be added in a future release.

Since the command is supposed to work on any type of ArcSDE geodatabase, we cannot assume any expected return value from the ConnectedUser property.

Sunday, December 14, 2008 5:01 AM by mahj

# re: Three new How-To articles in Geodatabase SDK

Good explanation about how to use the edit session.

I've a doubt realted to this . I'm creating a stand alone application in C#.Net with ArcEditor 9.3 license. In the application one of the function is loading data from one feature class to other feature class in a geodatabase where both the feature classe pre-exist. So I decided to use the LoadObjects fucntionality in the IObjectLoader interface.Since i want the data to be reflected in the database only after all the process is completed(commit) I did the whole process of loadobjects inside an edit session. Since I dont't have access to the Editor(I belive I can't have access to Editor outside the ArcMap environement) used the IWorkspaceEdit edit session. But the editsession doesnn't seem to have any effect on the LoadObjects as the data is reflected in the database immediately after the execution of LoadObjects is completed before i say IWorkSpaceEdit.StopEditing. The Load objects has a parameter IEditor but I'm not sure how to pass the edit session to it in this case .If someone can give any idea about how to proceed in this case it will be rally useful.

Monday, February 09, 2009 10:05 PM by gisaccnt
Anonymous comments are disabled