Any Option to Save Changes to Database?

C

Cor Ligthert [MVP]

Jonathan,

I have read all your posts in this thread and even the answers from
everybody, while you accuse a person in this thread to have been negative
about Microsoft developers, I did not see it, so tell us who it was. I saw
only very intensive tries to help you. But in my idea you haven't even read
those.

You use a lot of words, but tells not much in it, mostly it is accusing
other people, that you don't understand it..

As Kerry ask what you have done with persisting the data in the database, he
does not get a reply like: "I don't understand what persisting the data in
the database is", but get an answer about a navigation control.

Kerry stays very friendly and tells exactly what probably the problem is.
But you probably only have read that he is not familiar with a navigation
control (like me in Windows Forms).

You can bind your controls to an in memory object, but that does not mean
that it is saved (persisted) to a database.

Cor
 
J

Jonathan Wood

I have no idea what you are going on about. As near as I could tell, Kerry
understood exactly what I was saying and his suggestions were the closest to
what it appears I was actually missing. Your comments, on the other hand,
raise only negativity and confusion, and offer nothing in the way of
addressing the reason for this thread.

Jonathan
 
J

Jonathan Wood

Yes, looks like that attempt resulted in the database never getting updated.
See my other posts for details. Thanks.

Jonathan
 
J

Jonathan Wood

Well, that answer is that I don't know if there is such an event. But, I
must say, it's hard for me to imagine situations where I wouldn't want my
changes saved.
 
W

William Vaughn \(MVP\)

We had someone on the list a week or so ago that had not executed the Update
statement against the TableAdapter/DataAdapter to post the changes. Could
this be the case?

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
 
J

Jonathan Wood

Yeah, I don't know if you saw my other post. When I simply drag a table from
the data sources window to a form, it creates everything for me. However,
this version of the navigation control includes a Save button where mine did
not. The code for the save button does something along the lines of what you
described.
 
J

Jonathan Wood

Yeah, well, as I mentioned, I think I have the issue resolved. I'm not using
a gridview so not sure what you're saying there. But I seem to have it
working, even if I don't like some of the defaults. :)

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

Patrice said:
Loading data, updating data in memory and then saving all changes in
single round trip is quite often used and actually favored by ADO.NET
(disconnected data). Anyway we could endelessly discuss if what is offered
out of the box makes sense so just concentrate on changing the default
behavior...

I gave a try at those controls. IMO a quite good place to look is the
TDataGridView_RowValidated event. You could in this event copy (or even
better create a private Save sub you'll call when needed) the lines
created for TBindingNavigatorSaveItem_Click. You may want also to try to
validate the current row and saving it when closing the form...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top