Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Switching Dataset backends quickly
Message
From
26/07/2007 18:25:25
 
 
To
26/07/2007 12:17:33
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
VB 8.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01243434
Message ID:
01243973
Views:
27
Bonnie,

Thanks very much. I agree with your programming philosophy 100%. The config file for connection strings is no problem, but how do I avoid using DataSets when Visual Studio makes them so damn seductive by having them do so much just by dragging them onto a form? I don't expect, or want, you to give me a detailed tutorial, but if you could point me to a source or two, I'd much appreciate it.

Thanks again,
David.


>David,
>
>First, the auto-quote stuff. Look at the "Message view setup" tab at the top right of this message "pane". Hover your mouse over that and you should see an option to "Enable auto quote".
>
>Now, the second thing is the TableAdapters. Unfortunately what the TableAdapter paradigm does, is to tie your DataSets/DataTables directly to your backend data. This is not good, IMHO. DataSets are meant to be a disconnected representation of your data. In my opinion, a DataSet should know nothing about where it's data came from. That is the job of the DataAccess layer of your application to figure out: the DataAccess layer makes the connection to the database, fills the DataSet, and then passes the DataSet back to the front-end UI layer (either directly via a Biz object or through a Web Service).
>
>In this way, it's easy to swap out your DataAccess layer to connect to another database server (say, switching from SQL Server to Oracle), without it ever affecting your DataSets. And by having your connection strings in a config file, it's also very easy to switch your connections from one database to a different one on the same server (say, switching from a test database to the real production database). You DO NOT want this stuff hard-coded in the application. Sorry, but that's just not the way it should ever be done.
>
>~~Bonnie
>
>
>
>
>
>>Bonnie,
>>
>>Thanks for the reply. Yes, I do have connection strings hard-coded in my application, and yes, I did let Visual Studio create all this stuff for me including the TableAdapters but everything has worked fine so far except for this tedious waiting while Visual Studio does something with the Dataset in the new location.
>>
>>I look forward to hearing more from you, but since the connection strings aren't causing me any problems, I don't see how putting them in a config file will speed things up.
>>
>>Cheers,
>>David.
>>P.S. If you could also tell me how to quote your message (i.e. the one I'm replying to), I'd appreciate that too.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform