You are here: > ESRI Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - ArcObjects 3rd Party IDE (C++, VB, C#, Delphi, etc.) forum

Error 462 THE REMOTE SERVER MACHINE DOES NO...   Daniel Brumm Oct 24, 2005
Re: Error 462 THE REMOTE SERVER MACHINE DOE...   Willem Ligtendag Oct 27, 2005
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Error 462 THE REMOTE SERVER MACHINE DOES NOT EXIST 
Author Daniel Brumm 
Date Oct 24, 2005 
Message I have been given the task to update some software my company developed. It was developed in 02' and has not been touched since. I do not consider myself a programmer but I can get by when I have too. Using ArcObjects in VB is new for me, I am used to VBA. Here is my Question:
When I am working in VB and I go to test my code, I always get this error. Now If I compile the code and run it as a dll I don't get this error.


Record Call Stack Sequence - Bottom line is error line.

cmdApply_Click C:\Documents and Settings\DAN BRUMM\Desktop\DLL\VBcode\frmSetup.frm Line : 378
ChangePageSize C:\Documents and Settings\DAN BRUMM\Desktop\DLL\VBcode\frmSetup.frm Line : 165

Error Number
462
Description
The remote server machine does not exist or is unavailable 
 
plicit
'Const c_SmoduleFileName As String = "E:\Huilin\Dodge_plat\DLL_dodge\frmSetup.frm"
Const c_SmoduleFileName As String = "C:\Documents and Settings\DAN BRUMM\Desktop\DLL\VBcode\frmSetup.frm"

Private Sub setupControls()
  On Error GoTo ErrorHandler

7:     cboWidth.Clear
8:     cboWidth.AddItem 8.5
9:     cboWidth.AddItem 11
10:     cboWidth.AddItem 17
11:     cboWidth.ListIndex = 0
12:     cboHeight.Clear
13:     cboHeight.AddItem 11
14:     cboHeight.AddItem 8.5
15:     cboHeight.AddItem 17
16:     cboHeight.ListIndex = 0
    
18:     cboUnit.Clear
19:     cboUnit.AddItem "Centimetres"
20:     cboUnit.AddItem "Degrees"
21:     cboUnit.AddItem "Feet"
22:     cboUnit.AddItem "Inches"
23:     cboUnit.AddItem "Kilometres"
24:     cboUnit.AddItem "Metres"
25:     cboUnit.AddItem "Miles"
26:     cboUnit.AddItem "Millimetres"
27:     cboUnit.AddItem "Nautical Miles"
28:     cboUnit.AddItem "Points"
29:     cboUnit.AddItem "Unknown Units"
30:     cboUnit.AddItem "Yards"
31:     cboUnit.ListIndex = 0
    
33:     optLastNameFirst.Value = True
            
35:     optNoneAd.Value = True
36:     tbxAdNo.Text = 3
37:     optStreetNo.Value = True
38:     optPage.Value = True
39:         chkComma.Value = 0
    Dim mapUnit As esriUnits
    Dim mapUnitLabel As String
    Dim i As Integer
    Dim pPage As IPage
44:     If iniExists Then
45:         loadParameters
        
47:         gotoLayout "Township"
48:         activateDataView
49:         activateMap "Map Page View"
50:         Set pMxDoc = m_papp.Document
51:         Set pMap = pMxDoc.FocusMap
52:         GetMapUnits pMap, mapUnit, mapUnitLabel
53:         For i = 0 To cboUnit.listCount - 1
54:             If cboUnit.List(i) = mapUnitLabel Then
55:                 cboUnit.ListIndex = i
56:                 Exit For
57:             End If
58:         Next i
        
60:         Set pPage = pMxDoc.PageLayout.page
61:         pPage.QuerySize pageWidth, pageHeight
        
63:         For i = 0 To cboWidth.listCount - 1
64:             If cboWidth.List(i) = pageWidth Then
65:                 cboWidth.ListIndex = i
66:                 Exit For
67:             End If
68:         Next i
69:         For i = 0 To cboHeight.listCount - 1
70:             If cboHeight.List(i) = pageHeight Then
71:                 cboHeight.ListIndex = i
72:                 Exit For
73:             End If
74:         Next i
        
76:         txtAcrobatDistiller.Text = C_DISEXE

        Dim fs As Object
79:         Set fs = CreateObject("Scripting.FileSystemObject")

81:         If fs.fileexists(C_townshipPATH & "\" & C_townshipSHP) Then
                
83:             tbxTownshipShapefile.Text = C_townshipPATH & "\" & C_townshipSHP
84:             setTownshipFields (tbxTownshipShapefile.Text)
85:             cboNameField.Text = NameField
86:             If TownRangeField <> "" Then
87:                 cboTownRangeField.Text = TownRangeField
88:             Else
89:                 cboTownRangeField.Text = "N/A"
90:             End If
91:         End If


94:         If fs.fileexists(C_parcelPATH & "\" & C_parcelSHP) Then
            
96:             tbxParcelShapefile.Text = C_parcelPATH & "\" & C_parcelSHP
97:             setParcelFields (tbxParcelShapefile.Text)
98:             cboOwnerField.Text = ownerField
99:             cboAcresField.Text = acresField
100:             cboPINField.Text = pinField
101:         End If
102:         If c_sectionPath <> "" And c_sectionShp <> "" Then

104:             If fs.fileexists(c_sectionPath & "\" & c_sectionShp) Then
105:                 tbxSectionShapefile.Text = c_sectionPath & "\" & c_sectionShp
106:                 setSectionFields (tbxSectionShapefile.Text)
107:                 cboSectionNumberField.Text = sectionNoField
108:             End If
109:         End If
110:         If c_insetPath <> "" And c_insetShp <> "" Then

112:             If fs.fileexists(c_insetPath & "\" & c_insetShp) Then
113:                 tbxInsetShapefile.Text = c_insetPath & "\" & c_insetShp
114:                 setInsetFields (tbxInsetShapefile.Text)
115:                 cboInsetNameField.Text = insetNameField
116:             End If

            
119:         End If
        
121:         If blnLastNamefirst Then
122:             optLastNameFirst.Value = True
123:         Else
124:             optFirstNameFirst.Value = True
125:         End If
126:         If blnStreetPage Then
127:             optStreetYes.Value = True
128:         Else
129:             optStreetNo.Value = True
130:         End If
        
132:         If blnSeePage Then
133:             optPage.Value = True
134:         Else
135:             optNamePage.Value = True
136:         End If
        
138:         If strAdNumber = "0" Then
139:             optNoneAd.Value = True
140:         Else
141:             optAd.Value = True
142:             tbxAdNo.Text = strAdNumber
143:         End If
144:             If blnCommaInOwnerName Then
145:                 chkComma.Value = 1
146:             Else
147:                 chkComma.Value = 0
148:             End If
149:     End If
    
    
    
    
  Exit Sub
ErrorHandler:
  HandleError False, "setupControls " & c_SmoduleFileName & " " & GetErrorLineNumberString(Erl), Err.Number, Err.Source, Err.Description, 4
End Sub



Private Sub ChangePageSize(pageX As Double, pageY As Double)
  On Error GoTo ErrorHandler

    Dim pPage As IPage
165:     Set pMxDoc = m_papp.Document
166:     Set pActiveView = pMxDoc.PageLayout
167:     Set pPage = pMxDoc.PageLayout.page
168:     pPage.PutCustomSize pageX, pageY 'set 17 X 11 layout
169:     pActiveView.Refresh

  Exit Sub
ErrorHandler:
  HandleError False, "ChangePageSize " & c_SmoduleFileName & " " & GetErrorLineNumberString(Erl), Err.Number, Err.Source, Err.Description, 4
End Sub
.
.
.
378:         ChangePageSize pageX, pageY
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Error 462 THE REMOTE SERVER MACHINE DOES NOT EXIST 
Author Willem Ligtendag 
Date Oct 27, 2005 
Message This is not an error in your code. It is a VB 6 quirk. The VB 6 debugger wraps its own process around the code in your DLL. Thus, your code runs inside a separate process. But because the code is supposed to run inside the ArcMap process itself, all kinds of unexpected things can happen. So every time you get a weird error inside the VB 6 debugger, the first thing you need to do is check if the error also happens outside the debugger. If not, its VB's fault, not yours!
The only solution for this is to test your code in VBA or switch to Visual Studio .NET. The VS.NET debugger is an order of magnitude better than the VB 6 one.

Regards,

Wim