Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

Column name = "System" in dataset

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Botha - 11 Sep 2007 17:52 GMT
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.
deftone - 11 Sep 2007 17:57 GMT
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?
Patrice - 11 Sep 2007 17:58 GMT
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

> 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.
Mark Rae [MVP] - 11 Sep 2007 18:12 GMT
> 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

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Chris Botha - 11 Sep 2007 18:40 GMT
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.

> 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.
Mark Rae [MVP] - 11 Sep 2007 18:52 GMT
> The problem is not with a Select statement, but the Dataset being
> generated by VS2005.

So don't...

Create your DataSet in code instead...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.