TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
abas shahen
NA
66
0
delete datarows from datatable
Dec 14 2009 2:34 PM
hi all, i beleive that i can delete rows from database by using sqldataadapter with deletecommand. in my scenario i want to delete some rows from my datatable without retreiving any rows from database, because no rows added by other users in this scenario. i have stored procedure to retrieve data from database then sqldataadapter filling my datatable without formating the datatable cols and rows because the data retrived from database directly. i want to delete some rows and add some rows to another table from the old table by using traditional command to delete rows from databse and using Datatable methods to delete rows from datatables but when i doing it i get the datatable dont have primary key. i want to know following : 1- when i retrieving rows from database by sqldataadapter directly to datatable , how i can delete rows from datatable ? 2- this approach is good, such as keep rows in datatable and delete required rows from datatable by datatable methods and delete rows from database by using traditional command? or delete by using sqldataadapter and using update method? note: after delete i dont want to retreive any more rows from database. thx alot
Reply
Answers (
2
)
Serial Ports
Add Columns with ADO.Net parameters