473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Dataset problem with column named "System"

The customer has a database with a column in a table named "System". I've
been using this method for years now - create a dataset (an .xsd file) for
the table. With a column named "System" in the dataset, it gives a
substantial number of compile errors.

To simplify the problem, add a Dataset with one table and one column called
"System" - below follows how it can be done:
Right click on the solution, click "Add", click "New Item" and then
"DataSet" and DataSet1 is OK for the name.
On the design sheet of DataSet1.xsd, right click. click "Add" and click
"DataTable".
Right click on the DataTable and click "Add" and click "Column".
Rename the column from "Column1" to "System".
Build the project = compile errors.
Note that renaming the column to "[System]" rather than "System" does not
work either.
Sep 17 '07 #1
4 1477
You are best-off avoiding things called "System"; unfortunately, it
means that anything with explicit namespace resolution (i.e. what the
designer spits out) will break, unless you start using aliases, or the
global prefix. Seriously - just cheat and call it SystemFlag or
similar; it just isn't worth the pain...

Marc

Sep 17 '07 #2
Hi Mark, thanks. Alias or global prefix sounds good - as this is just one
column, if you know how please let me know?
"Marc Gravell" <ma**********@gmail.comwrote in message
news:11**********************@57g2000hsv.googlegro ups.com...
You are best-off avoiding things called "System"; unfortunately, it
means that anything with explicit namespace resolution (i.e. what the
designer spits out) will break, unless you start using aliases, or the
global prefix. Seriously - just cheat and call it SystemFlag or
similar; it just isn't worth the pain...

Marc

Sep 17 '07 #3
Chris,

In my opinion is Marc his advice very good, spare you the time, with this
word you have the change that it will happen again later.

Cor

"Chris Botha" <ch*************@hotmail.comschreef in bericht
news:O8****************@TK2MSFTNGP03.phx.gbl...
Hi Mark, thanks. Alias or global prefix sounds good - as this is just one
column, if you know how please let me know?
"Marc Gravell" <ma**********@gmail.comwrote in message
news:11**********************@57g2000hsv.googlegro ups.com...
>You are best-off avoiding things called "System"; unfortunately, it
means that anything with explicit namespace resolution (i.e. what the
designer spits out) will break, unless you start using aliases, or the
global prefix. Seriously - just cheat and call it SystemFlag or
similar; it just isn't worth the pain...

Marc

Sep 18 '07 #4
Demo below, but this is *not* a good idea; it will keep biting you,
and could make IDE functions like the forms designer very unreliable.

using SomeAlias = System;

class SystemDemo
{
bool System { get { return true; } }
void AliasDemo()
{
SomeAlias.Net.TransportType type =
SomeAlias.Net.TransportType.Tcp;
}
void GlobalDemo()
{
global::System.Net.TransportType type =
global::System.Net.TransportType.Tcp;
}
}

Sep 18 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dave C. | last post by:
Hi, I have a few things on my databases which seem to be neither true system objects or user objects - notably a table called 'dtproperties' (created by Enterprise manager as I understand,...
0
by: Asaf | last post by:
Hi, Sometimes I am getting the error "Cannot access a disposed object named "System.Net.TlsStream"." on the first attempt to do HTTP POST from a Windows 2003 Server. Is there a solution to...
5
by: SMike | last post by:
I am getting the following error when sending a first http request: Cannot access a disposed object named "System.Net.TlsStream". After that everything sems to be fine untill the next long idle...
2
by: Asaf | last post by:
Hi All, When doing HTTP POST to SSL URL I am getting the error: Cannot access a disposed object named "System.Net.TlsStream". I have found this code in the internet but it does not solve the...
14
by: Ronald S. Cook | last post by:
I'm just curious how you would handle this. In the cable industry, Comcast is referred to as an "MSO" (multiple systems operator) meaning they own many cable systems. Therefore a solution must be...
5
by: CoderMarc | last post by:
Hi, I can not get the system pause to work in a simple program. Here is my program below: // i/o example #include <iostream> using namespace std; int main ()
5
by: Chris Botha | last post by:
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...
4
by: Chris Botha | last post by:
The customer has a database with a column in a table named "System". I've been using this method for years now - create a dataset (an .xsd file) for the table. With a column named "System" in the...
0
by: tvnaidu | last post by:
Porting windows app to Linux, can I replace windows "_mkdir" with system("mkdir") in Linux?. system("mkdir(...)");
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.