ASP.NET & Databases Part 1
page 6 of 7
by . .
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 33664/ 86

Command Builder

Command Builder

When we view the dataset in Part 2, you'll see why this is useful (and I recommend it for all of your dataset updating needs). Basically when you make a change in the dataset and want to update the data source you can use one of these to generate the SQL all for you.

Dim objCmdBld As New OleDbCommandBuilder(objAdapter)

From there on its automatic, you can update a data source with this command alone

objAdapter.Update(ds, "users")

and it will update fine.

You'll find out more about this in Part 2.

What we haven't gone over here is the use of the very few others and we haven't gone over the SQL Server ones. The others are for more advanced functions and can be left till later and then SQL Server ones are basically the same (Replace OleDb with SQL and the namespaces are a bit different).

View Entire Article

User Comments

Title: Re: One comment   
Name: Philip Q
Date: 2004-10-25 11:08:14 PM

The reason for that is that you have imported System.Data, but not System.Data.OleDb into your page.
Title: One comment.   
Name: Jen
Date: 2004-10-25 9:33:47 AM
Putting the OleDBConnection command into the page_load event gives the error that OleDBConnection is not defined. However, OleDb.OleDbConnection works.
Title: to work with more than one dataset   
Name: Santhosh Kumar A.
Date: 2004-10-19 6:41:29 AM
I found it very good. Please try to include how
to manipulate rows using For Each ... Next loop.
I was really searching for it.

Santhosh Kumar A.
Kerala, India

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2021  |  Page Processed at 2021-12-02 7:24:26 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search