The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Dataset with Data Access Application Block

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Krishna

Posts: 16
Nickname: jkicha
Registered: Apr, 2005

Java developer learning .NET
Dataset with Data Access Application Block Posted: Apr 14, 2005 5:38 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Krishna.
Original Post: Dataset with Data Access Application Block
Feed Title: Enterprise Library
Feed URL: http://dev2dev.bea.com/sqr/categories/slicesOfPy/rss.xml
Feed Description: en-US Wed, 13 Apr 2005 03:25:01 -0500 Blogger http://www.blogger.com/ Looking for good tutorial to learn DataGrid control http://entlib.blogspot.com/2005/04/looking-for-good-tutorial-to-learn.html noemail@noemail.org (Krishna) Wed, 13 Apr 2005 03:38:21 -0500 tag:blogger.com,1999:blog-11640984.post-111338150192037322 In my application I need to use Datagrid control, to display as well as edit data. I found lot of articles from this DataGridGirl and this from MSDN. Basically I want to use DataGrid to add, update and delete a set of records.I don't want to use the VS.NET todo data binding.I want to use data binding inside my c# code. Once I make this work, I'll do a writeup.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Krishna
Latest Posts From Enterprise Library

Advertisement
While creating a new application using new Enterprise Library DAAB,

Configure the database information using Enterprise Library Configuration tool.

Import the Microsoft.Practices.EnterpriseLibrary.* namespaces.


using Microsoft.Practices.EnterpriseLibrary.Configuration;
using Microsoft.Practices.EnterpriseLibrary.Data;
....
....

private void btnSubmit_Click(object sender, System.EventArgs e)
{
      Database db = DatabaseFactory.CreateDatabase();
      string insertStmt = "insert into requests (name, dept) values ('" + txtName.Text + "','" + txtDept.Text + "')";
      DBCommandWrapper insCommand = db.GetSqlStringCommandWrapper(insertStmt);
      db.ExecuteNonQuery(insCommand);
}


No need to have typical "Connection code".
I am new to .NET and learning the tricks here...

Read: Dataset with Data Access Application Block

Topic: Loading two versions of an assembly that are not in the GAC Previous Topic   Next Topic Topic: Blogs.RegexAdvice.com - smells like community spirit

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use