call function

  • Thread starter Thread starter sirron
  • Start date Start date
S

sirron

This is my call function everytime I try to call
I get a Compile error Expected list separator or )
the error is here
call openSDEWorkspace(Server As String, Instance As
String, User As String, _
Password As String, Optional Database As
String = "", _
Optional version As String
= "SDE.DEFAULT") As IWorkspace
 
You need to be aware of two things:
1.-HOW you define your routine on code modules, you do
something like this:
Function openSDEWorkspace(Server As String, _
Instance As String, User As String, _
Password As String, _
Optional Database As String = "", _
Optional version As String = "SDE.DEFAULT") _
As IWorkspace
' your openSDEWorkspace code comes here
End Function
2.- HOW you use the routine and you do it with something
like the following:
Dim IWS as IWorkspace
.....
IWS=openSDEWorkspace(ServerValue, InstanceValue, _
userValue, passwordValue, DataBaseValue, _
versionValue)
' you can use the IWS value here
.....
You can use your code using the call function, but you can
not use the IWorkspace value it will return to you like
follows:
.....
call openSDEWorkspace(ServerValue, InstanceValue, _
userValue, passwordValue, DataBaseValue, _
versionValue)
' you don't have the IWorkspace value
....


Francisco Mariscal
fcomariscal at hotmail dot com
 
Back
Top