472,374 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,374 software developers and data experts.

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 3158
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tomek Kmiecik | last post by:
Hello! I'm writing simple database application. One table in the database stores some information about keywords (among other, keyword name, id number and description). Description is stored in...
9
by: Timm | last post by:
I have an ASP.NET 2.0 page with two DropDownLists. I am using declarative data binding wherever possible and trying to minimize the use of code. The list of values in DropDownList DDL2 should be...
2
by: AH | last post by:
Dear all, I am facing this 'bug' that really drive me nut. I created a trigger for Update script and tested in Enterprise manager to ensure it function correctly. However, when I used both VB or...
19
by: Simon Verona | last post by:
I'm not sure if I'm going down the correct route... I have a class which exposes a number of properties of an object (in this case the object represents a customer). Can I then use this...
4
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
2
by: Matthias | last post by:
Hi Team this may be a newbie question. I have searched the discussions before posting: I'd like to re-use a form instance to edit record details. My data binding (a DataTable bound to...
0
by: A.J | last post by:
There is a : 1.DataGrid: Columns-->firstName,LastName,EMail,PhoneNumber 2.GroupBox: controls-->4 TextBoxes(firstName,LastName,EMail,PhoneNumber) 3.Both DataGrid and GroupBox are binded to the...
1
by: Jim | last post by:
Hi, Trying to implement databinding. I've a dataset with a table, a windows form with typical controls: combobox, datetimepicker, textbox . . . I use what I think is a normal method to...
6
by: Tomasz J | last post by:
Hello developers, I bind my TextBox control specyfying a format stored in my application global ApplicationContext object - it has a static string CurrencyFormat property. The problem - this...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.