Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,075 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,795 people online right now. Registration is fast and FREE... Join Now!




data grid update

 
Reply to this topicStart new topic

data grid update

a_a_s
13 May, 2008 - 12:09 PM
Post #1

D.I.C Head
**

Joined: 20 Feb, 2008
Posts: 67

hi
i am using data grid and i want to update it when user change i but the fallowing command in button to save update but it did not work and it give error massage
CODE

Dim builder As OleDbCommandBuilder = New OleDbCommandBuilder(DataAdapter1)

Dim CmdB As New OleDb.OleDbCommandBuilder(DataAdapter1)
DataAdapter1.Update(DataSet1, "Section")


the error messge (Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.)
User is offlineProfile CardPM
+Quote Post

Jayman
RE: Data Grid Update
13 May, 2008 - 01:10 PM
Post #2

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 7,319



Thanked: 66 times
Dream Kudos: 500
Expert In: Everything

My Contributions
You need to have a primary key in your table and it must be returned in the select statement that is used to build the Insert, Update, and Delete commands.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 11:09PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month