M
Mark Olbert
I've just discovered something really annoying: if you drag and drop a stored procedure onto DataSet design surface in VS2005 you
get what >>looks<< like a TableAdapter...only it isn't. Specifically, it doesn't expose a Connection property.
The same thing happens if you create a DataTable object on the DataSet design surface and have it initialize itself from a stored
procedure (rather than from SQL statements). No Connection property!
This is really, really annoying, when it comes time to deploy a website application to a production server: the query-derived
TableAdapters still "point" at the development database. What's worse, the problem doesn't surface until you go to a page on the
production server that uses on of these query-based adapters...and then the page blows up because it can't access the development
database server.
So, several questions:
1) What's the workaround? The only one I've been able to come up with is to make separate production and development DataSets in the
VS2005 project. I guess I could wrap a class around them which returned the "right" one for the active environment. But that sounds
ugly and flaky.
2) Why is there a distinction between TableAdapters derived from stored procs and TableAdapters based on SQL statements?
3) If the answer to #2 is "it's a bug", why wasn't it fixed in VS2005 SP1? (It wasn't; I'm running SP1)
4) When will the fix be made available?
- Mark
get what >>looks<< like a TableAdapter...only it isn't. Specifically, it doesn't expose a Connection property.
The same thing happens if you create a DataTable object on the DataSet design surface and have it initialize itself from a stored
procedure (rather than from SQL statements). No Connection property!
This is really, really annoying, when it comes time to deploy a website application to a production server: the query-derived
TableAdapters still "point" at the development database. What's worse, the problem doesn't surface until you go to a page on the
production server that uses on of these query-based adapters...and then the page blows up because it can't access the development
database server.
So, several questions:
1) What's the workaround? The only one I've been able to come up with is to make separate production and development DataSets in the
VS2005 project. I guess I could wrap a class around them which returned the "right" one for the active environment. But that sounds
ugly and flaky.
2) Why is there a distinction between TableAdapters derived from stored procs and TableAdapters based on SQL statements?
3) If the answer to #2 is "it's a bug", why wasn't it fixed in VS2005 SP1? (It wasn't; I'm running SP1)
4) When will the fix be made available?
- Mark