Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question
    
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 –  gkar Jun 6 '13 at 15:02
add comment

1 Answer 1

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

See ISetDefaultConnectionInfo.SetParameters and ISetDefaultConnectionInfo3.SetParameters3.

share|improve this answer
    
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? –  gkar 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. –  gkar 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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