Welcome to WindowsClient.net | My Blog | Sign in | Join

Windows Client Videos

How Do I Use DataSets in an N-Tier Application?

Many distributed architectures use DataSets on the client and the server when both are written with .NET. In this video, Visual Basic developers will learn how to use the new N-Tier DataSets in Visual Studio 2008 that makes this architectural scenario easy to accomplish.

Presented by Beth Massi

Comments

BethW said:

Please post a C# code sample for us newbies!

# March 14, 2008 11:25 AM

jytylr said:

Hi BethW. A C# sample is not available for this video, but a VB sample is. You might find this somewhat helpful: code.msdn.microsoft.com/.../FileDownload.aspx

# March 16, 2008 12:11 AM

Pat Tormey said:

Hi Beth

Great video on N-Tier.

Quick question on your technique for Updating Added Rows.

I always re-query the local dataset after an update thinking that I need to capture what others users might have changed. Am I working too hard or is it still the safest way to be sure this client is in sync?

Thanks

Pat in New Hampshire USA

# April 11, 2008 7:59 AM

Annshul said:

Thnx  jytylr for info!

# April 14, 2008 8:53 PM

lovedie84 said:

thank u very much !

# May 23, 2008 2:25 AM

liufan2000 said:

when i deply this application, how to modify the connectionstring? thanks!

# June 5, 2008 11:13 PM

tcotton said:

I also want to know how to change the connection string once the app is deployed?

# June 21, 2008 9:44 PM

Pat Tormey said:

At Runtime the Connection String is read-only becaase it application scoped.. BUT we're programmers so we don't have to live with that! (g). It turns out the read only part is due to the strong naming.. So you can simply overrite the value using something like My.Settings("ConnectionsString")="Any new connection string.."

Of course then WHEN to change is becomes an issue..

You can check out my Video at windowsclient.net/.../video.aspx

Pat Tormey

New Hampshire USA

# August 18, 2008 9:33 AM

Zaben said:

The tricky part between visual basic and C# in this sample is in the NorthwindEntities Library

Is Event Handle, in C# you will need to override EndInit()

public override void EndInit()

{

   base.EndInit();

   ColumnChanged += new System.Data.DataColumnChangeEventHandler(OrdersDataTable_ColumnChanged);

}

# October 18, 2008 9:16 AM

kingjeremy said:

Hi Beth great video and I used this concept for an application. But I got a problem on creating the method for saving a master/detail table scenario (as in your video samples a customer orders sample). I searched the web and couldn't find any information for such an example. Any help would be very much appreciated.

Thanks.

# October 20, 2009 6:16 PM

rthoma10 said:

Hi Beth,

Great video, very helpful!  One question, though:  every N-Tier example i've seen uses a WCF service.  I do not have the luxury of being able to use one where i work.  How would that affect the N-Tier design using datasets?

# January 26, 2010 7:02 AM

Barbo said:

Hi Beth,

Great video, Do you use the same principles when writing a Windows mobile application?

If not is it possible to show an example in vb.net.

# March 22, 2010 1:45 PM

coommark said:

Great tutorial! Straight to the point, just perfect!

I re-coded it in C#. Fetching works just fine. But I cant get Updates to work. Please has anyone been able to perform Updates using C#? What do I need to do to get this to perform Updates and Inserts using C#?

Hoping someone will help me here.

Thank you Beth and everyone here helping.

# August 19, 2010 6:38 PM

Zaben said:

@coommark

At the link below you will find the sample in C#

[ NorthwindNTier_2008CS|code.msdn.microsoft.com/csdatasetntiers]

# August 19, 2010 8:59 PM

coommark said:

Thank you very much Zaben. Modified the code but couldnt get it to update still. Guess its my C# code for update?

Well i abandoned the use of WCF (which i dont know well, really).

Thank you soo very much.

# August 20, 2010 10:04 AM