M
Mike
Hi,
I'm delevloping a webservice that returns typed datasets with visual
studio 2005. The problem is, that the typed data set in the client app
is not the same as in the webservice. If I change the property
'NullValue' of the row to (empty) the dataset on the client does still
throw an exception. I added a column to see if the project updates the
reference.cs - and it does!
This is the generated code from the original dataset:
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public string Firstname {
get {
if (this.IsFirstnameNull()) {
return string.Empty;
}
else {
return
((string)(this[this.tableAuthUsers.FirstnameColumn]));
}
}
set {
this[this.tableAuthUsers.FirstnameColumn] = value;
}
}
And this the code in the reference.cs:
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public string Firstname {
get {
try {
return
((string)(this[this.tableAuthUsers.FirstnameColumn]));
}
catch (System.InvalidCastException e) {
throw new
System.Data.StrongTypingException("Der Wert für Spalte Firstname in
Tabelle AuthUsers ist DBNull.", e);
}
}
set {
this[this.tableAuthUsers.FirstnameColumn] = value;
}
}
Is this a bug or is it expected behavior? Can anyone tell me how to
work around?
Thanks in advance.
Mike
I'm delevloping a webservice that returns typed datasets with visual
studio 2005. The problem is, that the typed data set in the client app
is not the same as in the webservice. If I change the property
'NullValue' of the row to (empty) the dataset on the client does still
throw an exception. I added a column to see if the project updates the
reference.cs - and it does!
This is the generated code from the original dataset:
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public string Firstname {
get {
if (this.IsFirstnameNull()) {
return string.Empty;
}
else {
return
((string)(this[this.tableAuthUsers.FirstnameColumn]));
}
}
set {
this[this.tableAuthUsers.FirstnameColumn] = value;
}
}
And this the code in the reference.cs:
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public string Firstname {
get {
try {
return
((string)(this[this.tableAuthUsers.FirstnameColumn]));
}
catch (System.InvalidCastException e) {
throw new
System.Data.StrongTypingException("Der Wert für Spalte Firstname in
Tabelle AuthUsers ist DBNull.", e);
}
}
set {
this[this.tableAuthUsers.FirstnameColumn] = value;
}
}
Is this a bug or is it expected behavior? Can anyone tell me how to
work around?
Thanks in advance.
Mike