PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET DataGrid Methods

Reply

DataGrid Methods

 
Thread Tools Rate Thread
Old 05-01-2007, 06:05 PM   #1
John
Guest
 
Posts: n/a
Default DataGrid Methods


I created a connection, adapter, and a dataset using a .mdb, then filling in
at runtime;



OleDbDataAdapter1.Fill(DataSet11)



I also created a DataGrid and bound it by changing the DataSource property
to 'DataSet11.MainTable'.



My Goal is to modify the data in the rows and also add new rows with new
data in MainTable at runtime and keep the changes permanent. What methods
would I use to do this?


  Reply With Quote
Old 05-01-2007, 09:33 PM   #2
RobinS
Guest
 
Posts: n/a
Default Re: DataGrid Methods

Since you say DataGrid, you're doing a web app?

Robin S.
-------------------
"John" <someone@nowhere.net> wrote in message
news:zrwnh.122$cK.23@newsfe11.lga...
>I created a connection, adapter, and a dataset using a .mdb, then
>filling in at runtime;
>
>
>
> OleDbDataAdapter1.Fill(DataSet11)
>
>
>
> I also created a DataGrid and bound it by changing the DataSource
> property to 'DataSet11.MainTable'.
>
>
>
> My Goal is to modify the data in the rows and also add new rows with
> new data in MainTable at runtime and keep the changes permanent. What
> methods would I use to do this?
>
>



  Reply With Quote
Old 06-01-2007, 02:41 AM   #3
John
Guest
 
Posts: n/a
Default Re: DataGrid Methods

No, its a win app
"RobinS" <RobinS@NoSpam.yah.none> wrote in message
news:a5CdnZXSsarZWQPYnZ2dnUVZ_vipnZ2d@comcast.com...
> Since you say DataGrid, you're doing a web app?
>
> Robin S.
> -------------------
> "John" <someone@nowhere.net> wrote in message
> news:zrwnh.122$cK.23@newsfe11.lga...
>>I created a connection, adapter, and a dataset using a .mdb, then filling
>>in at runtime;
>>
>>
>>
>> OleDbDataAdapter1.Fill(DataSet11)
>>
>>
>>
>> I also created a DataGrid and bound it by changing the DataSource
>> property to 'DataSet11.MainTable'.
>>
>>
>>
>> My Goal is to modify the data in the rows and also add new rows with new
>> data in MainTable at runtime and keep the changes permanent. What methods
>> would I use to do this?
>>
>>

>
>



  Reply With Quote
Old 07-01-2007, 05:26 AM   #4
Cor Ligthert [MVP]
Guest
 
Posts: n/a
Default Re: DataGrid Methods

John,

In a multiuser environment you have only one choose.

Updating the database.
Clear the dataset
Fill the dataset again.

It was probably not what you whished, but it is hard to get the changes by
other users (althought that is possible in version 2005, is it probably more
work and takes a lot from your computer).

http://www.vb-tips.com/dbpages.aspx...1c-3503c15fd46e

Cor

>



  Reply With Quote
Old 07-01-2007, 07:55 AM   #5
RobinS
Guest
 
Posts: n/a
Default Re: DataGrid Methods

If he has a multi-user environment, you're right. (Of course.)

If he doesn't, as long as the grid is bound, he could use a table
adapter to save the changes. Or a data adapter, but he has to write
his own logic. No matter what he does, he should *not* use that pesky
CommandBuilder. ;-) We all agree on that!

I didn't answer this at first, because it seems like an enormous
question
to me. There are whole chapters of books written about this very topic.

So John -- is it a multi-user environment?

Robin S.
------------------------
"Cor Ligthert [MVP]" <notmyfirstname@planet.nl> wrote in message
news:%23wzJUwhMHHA.5012@TK2MSFTNGP02.phx.gbl...
> John,
>
> In a multiuser environment you have only one choose.
>
> Updating the database.
> Clear the dataset
> Fill the dataset again.
>
> It was probably not what you whished, but it is hard to get the
> changes by other users (althought that is possible in version 2005, is
> it probably more work and takes a lot from your computer).
>
> http://www.vb-tips.com/dbpages.aspx...1c-3503c15fd46e
>
> 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