G
Guest
I am using typed datasets in a forms application. I would like to use one
typed dataset to run my application against my test database. Then when I’m
ready to release it I would like to point the typed dataset to the production
database. (The schema will be exactly the same).
I don’t want to have to change the connection strings one datatable at a
time in the wizard. And I don’t want to have to create a production dataset
and test dataset. (Because the code will expect to be working with a
particular typed dataset) I would like to be able to make the change
without having to enter the dataset wizard.
Perhaps flip a switch in the app config file if possible. (But I will also
want to be able to perform the switch on datasets that reside in a separate
class library)
I experimented with editing the connection string in the config file but
the datasets appear to cache the connections strings. Even rebuilding the
assembly didn’t refresh the connection strings from the config file. I
noticed that if I browsed backward to the connection selection in the wizard
that the dataset would grab the new version of the connection string from the
config file on the next rebuild.
I am currently using one Typed data set for each database. (test MsAccess,
Test MsSql, prod MsAccess, prod MsSql) For read only operations I’m able to
populate the tables of one typed dataset from the other typed datasets using
the myTypedDatatable.merge(SourceTable). But this is horrible for code
readability and the application and does not even permit testing of
insert/update operations.
I think I must be missing something…there has to be a better way of doing
this…
Thanks in advance,
-Jeff
typed dataset to run my application against my test database. Then when I’m
ready to release it I would like to point the typed dataset to the production
database. (The schema will be exactly the same).
I don’t want to have to change the connection strings one datatable at a
time in the wizard. And I don’t want to have to create a production dataset
and test dataset. (Because the code will expect to be working with a
particular typed dataset) I would like to be able to make the change
without having to enter the dataset wizard.
Perhaps flip a switch in the app config file if possible. (But I will also
want to be able to perform the switch on datasets that reside in a separate
class library)
I experimented with editing the connection string in the config file but
the datasets appear to cache the connections strings. Even rebuilding the
assembly didn’t refresh the connection strings from the config file. I
noticed that if I browsed backward to the connection selection in the wizard
that the dataset would grab the new version of the connection string from the
config file on the next rebuild.
I am currently using one Typed data set for each database. (test MsAccess,
Test MsSql, prod MsAccess, prod MsSql) For read only operations I’m able to
populate the tables of one typed dataset from the other typed datasets using
the myTypedDatatable.merge(SourceTable). But this is horrible for code
readability and the application and does not even permit testing of
insert/update operations.
I think I must be missing something…there has to be a better way of doing
this…
Thanks in advance,
-Jeff