M
michaeltorus
Hi
Trying to sort out how to implement the use of connection strings with our new .Net Data Acces Layer(DAL).
2 solutions have been propoesed. Both suggest storing the connecion string in the machine.config file. The DAL uses SQLCleint namespace. At this stage there is only one SQL data store(with multiple data bases), but that might change in the future. Also, we are not using COM+ / Enterprise services, only manual transactions.
The 2 solutions differ, in that the first requires each part of the application to get the connection string, and pass it through every tier/layer (presentation, business, dalcs) to the DAL ...
The second solution makes it possible for the DAL to retrieve a named datasrouce from machine.config, and only DAL Components(DALCS which inherit the DAL) can specify a datasource.
If this makes any sense, can anyone suggest best of the two options, and why they think that? And if anyone has an even better solution to post that up would be great !
Cheers
Mike
Trying to sort out how to implement the use of connection strings with our new .Net Data Acces Layer(DAL).
2 solutions have been propoesed. Both suggest storing the connecion string in the machine.config file. The DAL uses SQLCleint namespace. At this stage there is only one SQL data store(with multiple data bases), but that might change in the future. Also, we are not using COM+ / Enterprise services, only manual transactions.
The 2 solutions differ, in that the first requires each part of the application to get the connection string, and pass it through every tier/layer (presentation, business, dalcs) to the DAL ...
The second solution makes it possible for the DAL to retrieve a named datasrouce from machine.config, and only DAL Components(DALCS which inherit the DAL) can specify a datasource.
If this makes any sense, can anyone suggest best of the two options, and why they think that? And if anyone has an even better solution to post that up would be great !
Cheers
Mike