PLEASE HELP... PLEASE HELP... PLEASE HELP... 
Author Message
 PLEASE HELP... PLEASE HELP... PLEASE HELP...

Can someone please give me the code to update a ole database with a dataset
that was previously filled with the ole database and edited.

I bounded a textbox.text control to the dataset.
I then changed the text in the textbox.text control
I then verified that the data was changed in the dataset.
I then want to UPDATE the Database with the Dataset.

I'm doing something wrong, yet I'm not sure what.  Can someone please post
some code that achieves this process

- Charles



Wed, 06 Oct 2004 12:54:42 GMT  
 PLEASE HELP... PLEASE HELP... PLEASE HELP...
Hi Charles,
Assuming you have a (SQL in this case) DataAdapter then you should be able
to call:
sqldataadapter1.update(mydataset)

Do not call mydataset.acceptchanges() before doing this however as this will
reset all the change flags in the dataset.  As a safety measure call
mybindingmanager.endcurrentedit (assuming a windows form app) before
performing the update to ensure all buffered edits are correctly written
through (although it sounds like they are if you can verify the change in
the dataset).

HTH
Phil


Quote:
> Can someone please give me the code to update a ole database with a
dataset
> that was previously filled with the ole database and edited.

> I bounded a textbox.text control to the dataset.
> I then changed the text in the textbox.text control
> I then verified that the data was changed in the dataset.
> I then want to UPDATE the Database with the Dataset.

> I'm doing something wrong, yet I'm not sure what.  Can someone please post
> some code that achieves this process

> - Charles



Wed, 06 Oct 2004 18:54:53 GMT  
 PLEASE HELP... PLEASE HELP... PLEASE HELP...
Okay, now here's where the story gets weird...

I can successfully bind the dataset back to the database via
SqlAdapter.UPDATE, but I CANNOT bind data via OLEAdapter.UPDATE.  Aren't
these things supposed to work identical?  Or is there something special you
have to do for an OLE datasource?

Also,  I noticed the controls work a little different when using WebForms.
In my WinForms version I used :
Me.BindingContext(DataSet11, "tablename").Position += 1

to walk up the dataset.  How is this achieved using WEBForms?  The
"Me.BindingContext" is not recognized while creating WebForms...

- Charles


Quote:
> Hi Charles,
> Assuming you have a (SQL in this case) DataAdapter then you should be able
> to call:
> sqldataadapter1.update(mydataset)

> Do not call mydataset.acceptchanges() before doing this however as this
will
> reset all the change flags in the dataset.  As a safety measure call
> mybindingmanager.endcurrentedit (assuming a windows form app) before
> performing the update to ensure all buffered edits are correctly written
> through (although it sounds like they are if you can verify the change in
> the dataset).

> HTH
> Phil



> > Can someone please give me the code to update a ole database with a
> dataset
> > that was previously filled with the ole database and edited.

> > I bounded a textbox.text control to the dataset.
> > I then changed the text in the textbox.text control
> > I then verified that the data was changed in the dataset.
> > I then want to UPDATE the Database with the Dataset.

> > I'm doing something wrong, yet I'm not sure what.  Can someone please
post
> > some code that achieves this process

> > - Charles



Thu, 07 Oct 2004 05:24:35 GMT  
 PLEASE HELP... PLEASE HELP... PLEASE HELP...
Also,  In my SQL example, I had to change the [Me.BindingContext(DataSet11,
"tablename").Position] in order for the changes to stay persistant.  I just
+= it and then -= it and called the SqlAdapter.UPDATE and the changes
stayed.  If I did not move the BindingContect, then the changes would NOT
stick!

Can you shed any light on this???

Charles


Quote:
> Hi Charles,
> Assuming you have a (SQL in this case) DataAdapter then you should be able
> to call:
> sqldataadapter1.update(mydataset)

> Do not call mydataset.acceptchanges() before doing this however as this
will
> reset all the change flags in the dataset.  As a safety measure call
> mybindingmanager.endcurrentedit (assuming a windows form app) before
> performing the update to ensure all buffered edits are correctly written
> through (although it sounds like they are if you can verify the change in
> the dataset).

> HTH
> Phil



> > Can someone please give me the code to update a ole database with a
> dataset
> > that was previously filled with the ole database and edited.

> > I bounded a textbox.text control to the dataset.
> > I then changed the text in the textbox.text control
> > I then verified that the data was changed in the dataset.
> > I then want to UPDATE the Database with the Dataset.

> > I'm doing something wrong, yet I'm not sure what.  Can someone please
post
> > some code that achieves this process

> > - Charles



Thu, 07 Oct 2004 05:40:25 GMT  
 PLEASE HELP... PLEASE HELP... PLEASE HELP...
Also,  In my SQL example, I had to change the
[Me.BindingContext(DataSet11,"tablename").Position] in order for the changes
to stay persistant.  I just "+=" it and then "-=" it and then called the
SqlAdapter.UPDATE and the changes stayed.  If I did not move the
BindingContect, then the changes would NOT stick!

When I tried this procedure with the OLEAdapter, I recive an error that says
"Concurrency violation: the UpdateCommand affected 0 records"  I still
cannot get the dataset to update an oleadapter.

Can anyone shed any light on this???

Charles


Quote:
> Hi Charles,
> Assuming you have a (SQL in this case) DataAdapter then you should be able
> to call:
> sqldataadapter1.update(mydataset)

> Do not call mydataset.acceptchanges() before doing this however as this
will
> reset all the change flags in the dataset.  As a safety measure call
> mybindingmanager.endcurrentedit (assuming a windows form app) before
> performing the update to ensure all buffered edits are correctly written
> through (although it sounds like they are if you can verify the change in
> the dataset).

> HTH
> Phil



> > Can someone please give me the code to update a ole database with a
> dataset
> > that was previously filled with the ole database and edited.

> > I bounded a textbox.text control to the dataset.
> > I then changed the text in the textbox.text control
> > I then verified that the data was changed in the dataset.
> > I then want to UPDATE the Database with the Dataset.

> > I'm doing something wrong, yet I'm not sure what.  Can someone please
post
> > some code that achieves this process

> > - Charles



Thu, 07 Oct 2004 05:45:13 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

2. Can anyone HELP me PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE

3. PLEASE HELP PLEASE HELP PLEASE HELP

4. Design Help PLEASE PLEASE PLEASE!

5. Please Please PLEASE HELP!!!!!

6. URGENT HELP PLEASE PLEASE PLEASE???

7. Please please please, help me :-)

8. Please, Please, Please I need help working with dates

9. Please, please, please help!!

10. Cloning problem -- please please please help

11. Please, please, please, help!

12. Please, Please, Please I need your help with Winsock

 

 
Powered by phpBB® Forum Software