DataSet in windows service

  • Thread starter Thread starter Sam Cole
  • Start date Start date
S

Sam Cole

Ok here goes

I have three applications that all do pretty much the same thing. All of
them take data from WMI and log it into a database.



The first application is a Standard EXE and works fine

The second is a web application and that also works fine.



The third however is a windows service. This one I am having problems with.
When I am generating the Dataset to be used with my collected data I get an
error.

The error appears in the generated code and occurs on the line containing

Friend WithEvents DataSet11 As MyNewService2.DataSet1 when hovering over the
line I get to see the error as

Type 'MyNewService.Dataset1' is not defined



This means I can not build the code as I get build errors. How ever this
only happens if I tick "Add This Dataset to the designer box." This by
default is ticked in both my other applications leaving it unchecked causes
problems as I can not refer to it in my code.



I guess I have two questions for anyone willing to help.



A. can I get the data I have in to a data adaptor in some other way

B. how can I fix the problem with the dataset so that I can refer to it in
my code



Thanks Sam Cole

SalanIT
 
.. . .
The error appears in the generated code and occurs on the line containing

Friend WithEvents DataSet11 As MyNewService2.DataSet1 when
hovering over the line I get to see the error as

Type 'MyNewService.Dataset1' is not defined

Unless you mistyped this to post it, I think the answer's in the question...

MyNewService2.DataSet1

MyNewService.Dataset1

Do either of these appear in the Root Namespace [Project] Property?

HTH,
Phill W.
 
Phil thanks for your response
the posting was correct

The line you are referring to was a direct copy of the code created by Dev
studio
MyNewService2.Dataset1 is the correct name as it was typed

MyNewService2 is the name of my service as I am trying to solve this problem
it happens to be the second time I have built a complete service to solve
this problem.

Sam
SalanIT

Phill. W said:
. . .
The error appears in the generated code and occurs on the line containing

Friend WithEvents DataSet11 As MyNewService2.DataSet1 when
hovering over the line I get to see the error as

Type 'MyNewService.Dataset1' is not defined

Unless you mistyped this to post it, I think the answer's in the question...

MyNewService2.DataSet1

MyNewService.Dataset1

Do either of these appear in the Root Namespace [Project] Property?

HTH,
Phill W.
 
Back
Top