Designer generated code fails to compile

P

Pat Moran

I have a project whose default name space is Wearther and form in the project
which is in this default namespace. I have also generated a dataset and
adapters to access a table in a database. I am using as a datasource this
dataset via the generated DatasetBindingSource.

The problem is that the code the designed generates includes the lines

this.wEATHERDETAILSTableAdapter = new
Weather._WeatherDetailsDataSetTableAdapters.WEATHERDETAILSTableAdapter();
this._WeatherDetailsDataSet = new Weather._WeatherDetailsDataSet();

which explicitly specify the Weather namespace although the class is
actually in this namespace and so the compilation fails unless I remove the
namespace qualification by hand.

How do I stop the designer from setting the namespace explicitly.

Thanks

Pat
 
C

Cowboy \(Gregory A. Beamer\)

I am not sure what is going on here, from your explanation.

I can tell you that you cannot get the tool to change it spots. It will
always use explicit naming. You can, if you know the correct information, go
through and whack it with Replace, however.

I have read your post a few times and I am not sure how you ended up with
this clash in the first place. If you can figure that out, the fact the tool
is explicit should not matter.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
 
P

Pat Moran

I don't know how it ends up like this but it is the case for a few but not
all geenrated datasets. I know I can simply edit the geenrated code to remove
the namespace and it wil compile. It is however very tedious to have to do
this several times a day.

The generated code uses the explicit naming only for these two statements.
 
C

Cowboy \(Gregory A. Beamer\)

One option you might try is setting up an application that can clean out the
namespace from the file(s). It will take an hour or so, but can save you a
lot of time in the long run.

I would also find out why the namespace is not working and see if you can
get the tool to create the file with explicit naming where it is correct.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top