473,543 Members | 2,462 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Te xt = "PETER"
bm.current.item ("userid") = Me.txtUserId.Te xt.
if ds.haschanges() then
............... .....
.....acceptchan ges()
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.te xt
bm.current.item ("userid") = strUserId <-- It can update the record
also.

Nov 21 '05 #1
2 3225
Hi,

You never used begin and end edit

bm.current.begi nedit
bm.current.item ("userid") = Me.txtUserId.Te xt.
bm.current.ende dit

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

"Agnes" <ag***@dynamict ech.com.hk> wrote in message
news:OS******** ********@TK2MSF TNGP12.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.Te xt = "PETER"
bm.current.item ("userid") = Me.txtUserId.Te xt.
if ds.haschanges() then
............... .....
.....acceptchan ges()
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.te xt
bm.current.item ("userid") = strUserId <-- It can update the record
also.


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

"Ken Tucker [MVP]" <vb***@bellsout h.net> ¼¶¼g©ó¶l¥ó·s»D: %2************* ***@TK2MSFTNGP1 4.phx.gbl...
Hi,

You never used begin and end edit

bm.current.begi nedit
bm.current.item ("userid") = Me.txtUserId.Te xt.
bm.current.ende dit

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

"Agnes" <ag***@dynamict ech.com.hk> wrote in message
news:OS******** ********@TK2MSF TNGP12.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.Te xt = "PETER"
bm.current.item ("userid") = Me.txtUserId.Te xt.
if ds.haschanges() then
............... .....
.....acceptchan ges()
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.te xt
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
2803
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 rtf format. Following code is responsible for data binding (lstKeywords is ListBox,rtbDescription is RichTextBox): lstKeywords.DataSource =...
9
5319
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 (filtered) dependent upon the selection in DDL1. I think this inevitably needs some code, but I'd be happy to be told otherwise! I have some code to...
2
2252
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 Server explorer to update the table, it gives me error, Couldn't VB just act as a intermidary to make the call and SQL server is supposed to do all the...
19
2317
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 object to databind to text boxes etc? I can't use a dataset as the object has loads of derived logic, for example updating one property may actually...
4
4603
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 bound to a table as a lookup, drawing values from another table to populate the available selections. This all worked fine in VB6. I have...
2
4889
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 TextBoxes) works fine the first time round. I can see, edit and update the details from my form, then close the form. I then like to select and refill...
0
1095
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 same datasource(Dataset) and Share the same BINDINGCONTEXT ie on clicking a record in the grid;we can see the same record in the groupbox. ...
1
2228
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 establish the bindings: textbox1.databindings.add("text", dataset, table.column) The records displays in the UI(if it exists). I can create an initial...
6
4578
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 works fine: Text='<%# Eval("Price", ApplicationContext.CurrencyFormat) %>'
0
7584
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7332
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7677
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5880
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5258
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4884
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3385
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3386
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1809
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.