Column name = "System" in dataset

C

Chris Botha

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.
 
D

deftone

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?
 
P

Patrice

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).
 
M

Mark Rae [MVP]

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
 
C

Chris Botha

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.
 

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

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top