The connection SDE problem in Mo has been entangled with me. After thinking for a long time, I haven't been connected. Later, I used the exhaustive method to list all the possibilities for testing. It turned out to have passed, and I was depressed. The summary method is as follows: (if new discoveries are found, you are welcome to add them)
Connect to SDE in MoCodeAs follows:
(What I don't understand is why sde83 is used to access SDE 9.0. The following is the code in Delphi. It should be similar in VB. After moview2 is modified, you can connect to SDE)
DC: = Imodataconnection (createoleobject ('mapobjects2. dataconnection '));
DC. Server: = 'Sde83: tangf '; // Before the server name, you must add the SDE and version number.
DC. User: = 'Sa '; // User name, of course, only users with read and write permissions can
DC. Password: = ' 123456 '; // Password
DC. database: = 'Sde '; // Databases, of course, can be other databases.
Connect to SDE in arccatalog:
(What I don't understand is that if a computer in the LAN accesses a SDE not on the local machine, the port number of the SDE server must be entered in the service instead of the service name. At least I tested it like this)
Connect to SDE in arcexplorer:
(Arccycler1.0 does not seem to be able to connect to sde9.0, so far I have not connected to sde9.0. Besides, esri_sde is the service name and cannot be changed to the port number. I cannot connect to esri_sde with 2.0 under 5151)
Welcome to correction and supplement.