PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 1.00 average.

Binding Manager (update record problem)

 
 
Agnes
Guest
Posts: n/a
 
      22nd Mar 2005
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.



 
Reply With Quote
 
 
 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      22nd Mar 2005
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" <(E-Mail Removed)> wrote in message
news:OSpD%(E-Mail Removed)...
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.




 
Reply With Quote
 
Agnes
Guest
Posts: n/a
 
      22nd Mar 2005
i use Endcurrentedit already ??

"Ken Tucker [MVP]" <(E-Mail Removed)> ¼¶¼g©ó¶l¥ó·s»D:%(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:OSpD%(E-Mail Removed)...
> 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.
>
>
>
>



 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Binding Manager/Currency Manager Problem? Jim Microsoft VB .NET 1 5th Jan 2008 09:30 AM
Data Binding to Access Query - Update problem Diarmuid Microsoft VB .NET 1 19th Sep 2005 10:39 AM
Read-only problem when binding a form to an ADO record source =?Utf-8?B?TFc=?= Microsoft Access VBA Modules 0 19th Nov 2004 10:09 PM
Binding Manager - great problem Agnes Microsoft VB .NET 1 11th Oct 2004 05:34 PM
Unusual binding problem with comboboxes and currency manager =?Utf-8?B?cG9seW5vbWlhbDVk?= Microsoft ADO .NET 0 31st May 2004 09:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:54 AM.