473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

What means this error message?

I am a newbie at VB.
When i try to remove an item from the BindingSource and try to delete this
item from the database:

BindingSource.RemoveCurrent()

Me.TABLETableAdapter.Update(Me.DataSet.TABLE)
i receive the message :

"Update requires a valid DeleteCommand when passed DataRow collection with
deleted rows."

What means this error message and how resolve this ?
Any code is it will acceptable.
Sorry for my english and thank you !

Feb 20 '07 #1
4 3212
You looking fo something like this?

http://msdn2.microsoft.com/en-us/lib...23(VS.80).aspx

Miro

"giannis" <zz********@freemail.grwrote in message
news:eN*************@TK2MSFTNGP05.phx.gbl...
>I am a newbie at VB.
When i try to remove an item from the BindingSource and try to delete this
item from the database:

BindingSource.RemoveCurrent()

Me.TABLETableAdapter.Update(Me.DataSet.TABLE)
i receive the message :

"Update requires a valid DeleteCommand when passed DataRow collection with
deleted rows."

What means this error message and how resolve this ?
Any code is it will acceptable.
Sorry for my english and thank you !

Feb 20 '07 #2
Miro wrote:
You looking fo something like this?

http://msdn2.microsoft.com/en-us/lib...23(VS.80).aspx
No
Feb 20 '07 #3

"giannis" <zz********@freemail.grwrote in message
news:eJ**************@TK2MSFTNGP04.phx.gbl...
Miro wrote:
>You looking fo something like this?

http://msdn2.microsoft.com/en-us/lib...23(VS.80).aspx

No
Yes you are. Look at the bottom of that article at "To delete records from
a database using command objects".

You don't have a DeleteCommand object defined for your data adapter or
TableAdapter object.

Robin S.
Feb 20 '07 #4
The answer is very simple :
"In some situations, the SELECT statement does not provide enough
information for the adapter to generate the commands necessary to create
the INSERT,UPDATE,and DELETE commands required for a successful save.
This often occurs when the database table does not have a primary key
column."
Therefore I need a primary key.
Now (i added a primary key) the :
Me.TABLETableAdapter.Update(Me.DataSet.TABLE)
works fine !!!

giannis wrote:
I am a newbie at VB.
When i try to remove an item from the BindingSource and try to delete
this item from the database:

BindingSource.RemoveCurrent()

Me.TABLETableAdapter.Update(Me.DataSet.TABLE)
i receive the message :

"Update requires a valid DeleteCommand when passed DataRow collection
with deleted rows."

What means this error message and how resolve this ?
Any code is it will acceptable.
Sorry for my english and thank you !

Feb 22 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: badz | last post by:
Hi friends I'm still exploring in PHP programming with little knowledge on C .. the mother of programming language.. Just wonder .. some times we will see some pepole use :: singn in their...
3
by: Odd Bjørn Andersen | last post by:
Every night at 21.30 we perform a full offline database backup. Just before the backup starts we do a db2stop/db2start. After the db2stop there is a message in the db2diag.log, and after the backup...
2
by: Andy Davis | last post by:
Dear Group I am trying to automate process of adding a new record id in my form using the following code when the user clicks the "Add New Record" button. For example if the last record id is...
13
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
8
by: Sjaakie Helderhorst | last post by:
Hi all, I'm trying to create a class which handles FTP. Knowing little of classes I'm having some trouble making things work. Also having trouble finding the meaning of some error-codes. The code...
10
by: Protoman | last post by:
Could you tell me what's wrong with this program, it doesn't compile: #include <iostream> #include <cstdlib> using namespace std; class Everything { public: static Everything* Instance()
63
by: Jake Barnes | last post by:
In the course of my research I stumbled upon this article by Alex Russel and Tim Scarfe: http://www.developer-x.com/content/innerhtml/default.html The case is made that innerHTML should never...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
46
by: Kenny O'Clock | last post by:
This came up in a job interview, what is the output of the program below? I tried to compile and run it myself, but my compiler (lcc-win32) aborts with this errors.... Warning test2.c: 3 ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.