N
Niki Reid via .NET 247
I'm trying to set up a web service that provides generic services to our other web services (resident on the same physical machine).
I've discovered that sqlCommands aren't serialisable, and that I need to pass an object reference.
Can anyone please give me either assistance in using object refs, or point me to a suitable resource?
I've found the general MS documentation on it, but can't find any eaxmples of what I need to do.
For example, I had intended the following, but now know this won't work.
AS GENERAL SERVICE
public main_service_fn() as dataset
'create sqlCommand COMM
'set COMMs attributes
'create dataset DS
DS = generic_server_fn(COMM)
end function
AS SERVICE TO SERVICE
public function generic_server_fn(byref COMM AS sqlclient.sqlcommand) as dataset
'create data adaptor DA
'set DA command property to COMM passed in
'create dataset, fill it using DA and return it.
The alternative is to TOSTRING the command and create a parsing routine on the generic server.
What would you recommend?
Many thanks for any assistance.
Niki
I've discovered that sqlCommands aren't serialisable, and that I need to pass an object reference.
Can anyone please give me either assistance in using object refs, or point me to a suitable resource?
I've found the general MS documentation on it, but can't find any eaxmples of what I need to do.
For example, I had intended the following, but now know this won't work.
AS GENERAL SERVICE
public main_service_fn() as dataset
'create sqlCommand COMM
'set COMMs attributes
'create dataset DS
DS = generic_server_fn(COMM)
end function
AS SERVICE TO SERVICE
public function generic_server_fn(byref COMM AS sqlclient.sqlcommand) as dataset
'create data adaptor DA
'set DA command property to COMM passed in
'create dataset, fill it using DA and return it.
The alternative is to TOSTRING the command and create a parsing routine on the generic server.
What would you recommend?
Many thanks for any assistance.
Niki