PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET Manipulating Records

Reply

Manipulating Records

 
Thread Tools Rate Thread
Old 11-02-2006, 08:25 AM   #1
Radi Radichev
Guest
 
Posts: n/a
Default Manipulating Records


Hi All!
How can i delete or insert a record without using the bindingNavigator
control? I can move through the records with the binding source but i can't
find out how to delete and insert records.... Any tips? Thanks!


  Reply With Quote
Old 11-02-2006, 10:06 AM   #2
Miha Markic [MVP C#]
Guest
 
Posts: n/a
Default Re: Manipulating Records

Use the appropriate delete/insert(or add) method on source itself.

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"Radi Radichev" <radi.radichev@uni-jena.de> wrote in message
news:eT8MATuLGHA.1536@TK2MSFTNGP11.phx.gbl...
> Hi All!
> How can i delete or insert a record without using the bindingNavigator
> control? I can move through the records with the binding source but i
> can't
> find out how to delete and insert records.... Any tips? Thanks!
>



  Reply With Quote
Old 11-02-2006, 10:12 AM   #3
Cor Ligthert [MVP]
Guest
 
Posts: n/a
Default Re: Manipulating Records

Radi,

There are a lot of possibilities the most simple ones are

DataTable.Add.Row(DataTable.NewRow);

DataTable.Rows(x).Delete();

Be aware not to use any Remove statement, that has another purpose than
deleting from a database.

I hope this helps,

Cor


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off