?
Solved

vb.net command builder

Posted on 2006-07-07
3
Medium Priority
?
1,917 Views
Last Modified: 2008-09-12
I know that vb.net command builder is created automatically through dataAdapter, I would like to know in which circumstance I should create a command builder through the code.

an example might help.

thanks

0
Comment
Question by:jskfan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
dttri earned 800 total points
ID: 17060074
Greetings!
This article contains an example on how to use SQLCommandBuilder class:
http://www.developer.com/lang/other/article.php/963511
0
 
LVL 5

Assisted Solution

by:Davidshc76
Davidshc76 earned 200 total points
ID: 17063296
OleDbCommandBuilder can be use to generate the command for insert, update, delete ....
But your table must have primary key generated. Below are the sample code ........

DaUserList = New OleDbDataAdapter()
DaUserList.SelectCommand = New OleDbCommand(SelectString, g_objconn)

Dim CB As OleDbCommandBuilder
CB = New OleDbCommandBuilder(DaUserList)
DaUserList.InsertCommand = CB.GetInsertCommand()
DaUserList.UpdateCommand = CB.GetUpdateCommand()
DaUserList.DeleteCommand = CB.GetDeleteCommand()

DsUserList = New DataSet()
DaUserList.Fill(DsUserList, "USERMASTER")
0
 
LVL 7

Expert Comment

by:dttri
ID: 17063405
There are many different CommandBuilder versions for different database system, eg OleDBCommandBuilder, SQLCommandBuilder, OracleCommandBuilder... but the general syntax is the same.
0

Featured Post

Application Discovery Service in AWS

In the era of the cloud, customers migrating away from their existing on-premise infrastructure. This requires lots of planning, strategies, and effort to identify their existing resources and determine how best to migrate.  Datacenter migrations happen in four phases -

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Progress
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question