469,935 Members | 1,792 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,935 developers. It's quick & easy.

Binding Manager (update record problem)

Binding Manager (update problem) by agnescheng
I use binding Manager to bind the textbox, I got a problem on update record.
E.g Me.txtUserId.Text = "PETER"
bm.current.item("userid") = Me.txtUserId.Text.
if ds.haschanges() then
....................
.....acceptchanges()
messagebox.show("Save is completed")
end if................
I found that Messagebox is showed, BUT the userid is still the old value.
WHY ?
Then I test that bm.current.item("userid") = "PETER" . <- IT CAN UPDATE THE
RECORD.
OR Dim strUserId as string = Me.txtUserId.text
bm.current.item("userid") = strUserId <-- It can update the record
also.

Nov 21 '05 #1
2 3068
Hi,

You never used begin and end edit

bm.current.beginedit
bm.current.item("userid") = Me.txtUserId.Text.
bm.current.endedit

http://msdn.microsoft.com/library/de...nedittopic.asp
Ken
------------------

"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:OS****************@TK2MSFTNGP12.phx.gbl...
Binding Manager (update problem) by agnescheng
I use binding Manager to bind the textbox, I got a problem on update record.
E.g Me.txtUserId.Text = "PETER"
bm.current.item("userid") = Me.txtUserId.Text.
if ds.haschanges() then
....................
.....acceptchanges()
messagebox.show("Save is completed")
end if................
I found that Messagebox is showed, BUT the userid is still the old value.
WHY ?
Then I test that bm.current.item("userid") = "PETER" . <- IT CAN UPDATE THE
RECORD.
OR Dim strUserId as string = Me.txtUserId.text
bm.current.item("userid") = strUserId <-- It can update the record
also.


Nov 21 '05 #2
i use Endcurrentedit already ??

"Ken Tucker [MVP]" <vb***@bellsouth.net> glsD:%2****************@TK2MSFTNGP14.phx .gbl...
Hi,

You never used begin and end edit

bm.current.beginedit
bm.current.item("userid") = Me.txtUserId.Text.
bm.current.endedit

http://msdn.microsoft.com/library/de...nedittopic.asp
Ken
------------------

"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:OS****************@TK2MSFTNGP12.phx.gbl...
Binding Manager (update problem) by agnescheng
I use binding Manager to bind the textbox, I got a problem on update
record.
E.g Me.txtUserId.Text = "PETER"
bm.current.item("userid") = Me.txtUserId.Text.
if ds.haschanges() then
....................
.....acceptchanges()
messagebox.show("Save is completed")
end if................
I found that Messagebox is showed, BUT the userid is still the old value.
WHY ?
Then I test that bm.current.item("userid") = "PETER" . <- IT CAN UPDATE
THE
RECORD.
OR Dim strUserId as string = Me.txtUserId.text
bm.current.item("userid") = strUserId <-- It can update the record
also.

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Tomek Kmiecik | last post: by
19 posts views Thread by Simon Verona | last post: by
2 posts views Thread by Matthias | last post: by
reply views Thread by A.J | last post: by
6 posts views Thread by Tomasz J | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.