R
rlm
I am using TableAdapters the same way in the code below. The first works, and
the second does not. Names shortened here for simplicity, and values
hardcoded.
In both cases I can stop in the debugger and see the correct connection
string in the TableAdapter, which they both get from web.config. I can't see
any difference between the two which would indicate why the second one fails.
Ideas?
XTableAdapter ta = new XTableAdapter();
if (ta.MarkAsDeleted(40) == 1) {//delete ok- now delete children
YTableAdapter taContact = new YTableAdapter();
if (taContact.MarkAsDeleted(72) == 1) {
Console.WriteLine("OK");
}
}
Also, I started getting a message box whenever I leave the VS DataSet
designer GUI which says "Connection string not set - cannot get data design
context". It has no further info. I have looked at every adapter and they all
have a connection string specified.
the second does not. Names shortened here for simplicity, and values
hardcoded.
In both cases I can stop in the debugger and see the correct connection
string in the TableAdapter, which they both get from web.config. I can't see
any difference between the two which would indicate why the second one fails.
Ideas?
XTableAdapter ta = new XTableAdapter();
if (ta.MarkAsDeleted(40) == 1) {//delete ok- now delete children
YTableAdapter taContact = new YTableAdapter();
if (taContact.MarkAsDeleted(72) == 1) {
Console.WriteLine("OK");
}
}
Also, I started getting a message box whenever I leave the VS DataSet
designer GUI which says "Connection string not set - cannot get data design
context". It has no further info. I have looked at every adapter and they all
have a connection string specified.