1

I am developing an ArcGIS extension with .NET and Desktop 10.1 The extension is creating an sde connection file on the fly and connect to the database When the user use any of the toolbox like (Select tool from the toolbox) and use one of the layers, the dialog box "Database connection" will be popup and ask the user of user name / password.

Is there a way to listen in the extension to those dialog boxes and fill them automatically. Or is there a way to listen to toolbox usage of the layers and pass the user name / password?

thanks

  • What is the purpose of this extension? Why does it create SDE connection files? Can you share your code? I don't think either of your proposed approaches are reasonable. – blah238 Jun 6 '13 at 9:40
  • I should say, that I am not creating the extension, but I am unfortunately maintaining it. I agree with you blah that this might be a bad approach. but I don't have a choice – Ghassan Karwchan Jun 6 '13 at 15:02
1

SdeWorkspaceFactory implements ISetDefaultConnectionInfo3 which allows you to specify default username, password and version for a given geodatabase.

See ISetDefaultConnectionInfo.SetParameters and ISetDefaultConnectionInfo3.SetParameters3.

  • I tried this, and it didn't work. It is working for other things, except for the toolbox. Can I debug what ArcGIS desktop is firing of events? Are there any events I can listen to? – Ghassan Karwchan Jun 6 '13 at 21:17
  • The answer provided above didn't work. I am not sure why the moderator consider it answered question, when my problem is still the same. – Ghassan Karwchan Jun 7 '13 at 19:51
  • @gkar, only the person asking a question can mark it answered; mod's can't do that. Any user can vote an answer up or down though. – matt wilkie Jun 10 '13 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.