E
Eric Sabine
In a project I have a VB windows app and a web service. The application is
being designed to run whether or not the user can access the web service, it
it can't, it will be in "disconnected" mode. I have created a typed dataset
in the windows app and copied it exactly to the service under another name.
In the app, the client instantiates the typed dataset of both the web
service and the local win app.
Friend connectedDs As MyApp.Windows.Services.appDataSet
Friend disconnectedDs As MyApp.Windows.discDataSet
While these datasets are identical in elements and element structures (3
tables in each), they of course have different names. In one method, the
client app should connect to the webservice, get the returned dataset
(connectedDs in my case) and then copy the data to the disconnectedDs.
Then, the existance of the connectedDs isn't import and will shortly
thereafter be killed. No updates ever get passed back to the webservice.
My problem exists at the copy. No matter how I try to copy, I get the
"specific cast is not valid" exception. (BTW Option Strict is ON).
Here's basically the line.
disconnectedDs = connectedDs.Copy
or
disconnectedDs = CType(connectedDs.Copy, MyApp.Windows.discDataSet)
Any hints on what I'm doing wrong?
Eric
being designed to run whether or not the user can access the web service, it
it can't, it will be in "disconnected" mode. I have created a typed dataset
in the windows app and copied it exactly to the service under another name.
In the app, the client instantiates the typed dataset of both the web
service and the local win app.
Friend connectedDs As MyApp.Windows.Services.appDataSet
Friend disconnectedDs As MyApp.Windows.discDataSet
While these datasets are identical in elements and element structures (3
tables in each), they of course have different names. In one method, the
client app should connect to the webservice, get the returned dataset
(connectedDs in my case) and then copy the data to the disconnectedDs.
Then, the existance of the connectedDs isn't import and will shortly
thereafter be killed. No updates ever get passed back to the webservice.
My problem exists at the copy. No matter how I try to copy, I get the
"specific cast is not valid" exception. (BTW Option Strict is ON).
Here's basically the line.
disconnectedDs = connectedDs.Copy
or
disconnectedDs = CType(connectedDs.Copy, MyApp.Windows.discDataSet)
Any hints on what I'm doing wrong?
Eric