473,327 Members | 2,071 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,327 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 929
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,...
11
by: Paminu | last post by:
Is there something like system("PAUSE") for linux?
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.