Recent Posts
Calendar
June 2013
S M T W T F S
« May    
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Posts Tagged ‘tableadapter’

Swapping Out the DAL

One of the comments that showed up on the blog post about using 3-tiered with DataSets and the ObjectDataSource was, “How do we set this up so that we can swap out the DAL?”  The simple answer to this is, “roll your own Table Adapter.”

Read the rest of this entry »

Republished by Blog Post Promoter

DataSets, TableAdapters, and Transient Retry Logic For SqlAzure

ppl-men-055The main project I’m working on these days is moving several web sites to Azure.  It is something I’ve wanted to be able to try for a while.  I’m working with several other agencies on this project and some Microsoft consultants so there is some good guidance along the way.

One of the things I wasn’t aware of until yesterday is that SqlAzure can shut down in the middle of your code trying to access it.  Actually, this could happen on any SQL server, but it happens frequently enough under Azure that we need to code for it.

Enter the Transient Conditions Handling Framework.

There has been a lot written about how to use this, and I don’t plan on covering that material yet again.  The particular issue we ran up against is that our code uses the standard DataSet/TableAdapter framework that MS gave us long ago.

Read the rest of this entry »

Transaction Tracking Typed Datasets Using SqlTransaction

misc_vol2_009

I recently had the need to implement transaction tracking between two separate databases on two separate servers.

Unfortunately, I could not be sure that DTC was implemented on either server, so using transaction tracking with the TransactionScope wasn’t an option.

I also wanted to be able to wire this in easily to the existing 3-tiered framework we are currently using so that what I ended up with could easily be implemented by other developers in a similar situation.

Read the rest of this entry »

One Form with Multiple Tables

B01I0093 I received the following question a few days ago:

“I am trying to use three tables from the same dataset in one form that I am creating in vs.net winforms my problem I guess is the setup of it as I can get them all on the form but cant get them to all post to the separate tables when I click save I am using a mysql database with the Mysql connector not the obdc can this even be done?”

Frustrating, isn’t it?  .NET makes some things SO easy, and then when it isn’t you figure you must have done something wrong.

The good news is, your problem probably has nothing to do with using mySQL–it is all in how you are using the database stuff in WinForms.

Read the rest of this entry »

Swapping the DAL Abstractly

Last Thursday, we looked at how to replace the TableAdapter with our own TableAdapter as a way or eliminating our dependence on Microsoft SQL.  The problem with this implementation is that every time you want to switch databases, you’ll need to switch what TableAdapter the code is using.

Read the rest of this entry »

Bear