469,621 Members | 1,853 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,621 developers. It's quick & easy.

Column name = "System" in dataset

There is a database table with one of the columns named "System".
When creating a new Dataset for this table, the project gives a huge number
of compile errors.
If I change the column name to be anything else than "System" and
re-generate the Dataset, it works. The problem is that this is an existing
database and there is no way that the column name will be changed.
Sep 11 '07 #1
5 1481
On Sep 11, 12:52 pm, "Chris Botha" <chris_s_both...@hotmail.com>
wrote:
There is a database table with one of the columns named "System".
When creating a new Dataset for this table, the project gives a huge number
of compile errors.
If I change the column name to be anything else than "System" and
re-generate the Dataset, it works. The problem is that this is an existing
database and there is no way that the column name will be changed.
Have you tried using an alias for that column when selecting the data?

Sep 11 '07 #2
Language ? In VB.NET you should be able to use [System] to avoid a naming
collision with the system namespace (or let us know more for example the
line that fails plus the compilation error message could be usefull for
better help).

--
Patrice

"Chris Botha" <ch*************@hotmail.coma écrit dans le message de news:
uE**************@TK2MSFTNGP04.phx.gbl...
There is a database table with one of the columns named "System".
When creating a new Dataset for this table, the project gives a huge
number of compile errors.
If I change the column name to be anything else than "System" and
re-generate the Dataset, it works. The problem is that this is an existing
database and there is no way that the column name will be changed.

Sep 11 '07 #3
"Chris Botha" <ch*************@hotmail.comwrote in message
news:uE**************@TK2MSFTNGP04.phx.gbl...
There is a database table with one of the columns named "System".
When creating a new Dataset for this table, the project gives a huge
number of compile errors.
If I change the column name to be anything else than "System" and
re-generate the Dataset, it works. The problem is that this is an existing
database and there is no way that the column name will be changed.
SELECT [System] AS SomethingElse FROM MyTable
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 11 '07 #4
Hi Guys, thanks for the help so far.

The problem is not with a Select statement, but the Dataset being generated
by VS2005.
So I right click on the solution, select Add New Item, then select Dataset,
then create the Dataset and the "wizard" asks for the table to be used, etc.
and finally one has the light-blue screen with the table diagram on the
screen with all the column names. Build and there are more than a hundred
compile errors.
Before posting the 1st message above I did change the column on the diagram
to be "[System]", with no success.
"Chris Botha" <ch*************@hotmail.comwrote in message
news:uE**************@TK2MSFTNGP04.phx.gbl...
There is a database table with one of the columns named "System".
When creating a new Dataset for this table, the project gives a huge
number of compile errors.
If I change the column name to be anything else than "System" and
re-generate the Dataset, it works. The problem is that this is an existing
database and there is no way that the column name will be changed.

Sep 11 '07 #5
"Chris Botha" <ch*************@hotmail.comwrote in message
news:eG*************@TK2MSFTNGP06.phx.gbl...
The problem is not with a Select statement, but the Dataset being
generated by VS2005.
So don't...

Create your DataSet in code instead...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 11 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Didier C | last post: by
4 posts views Thread by Chris Botha | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.