473,385 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Dataset.HasChangesmethod ?


I have a problem i donr seem to be able to find a soloution to

i have created a dataset, binded the controls to it, set primary keys
managed to set up navigation through the table
and even search for a value and move to that record. I have now come to an
abrupt halt with something i thought would be simple ..
updating records.

I have tried using the Client_RS.HasChanges(DataRowState.Modified) function
( Client_Rs being my Dataset )
but im not getting the expected result.

If make changes in the strCompanyName textbox, and check to see if the
Client_RS.HasChanges is true it isnt its still false, however if i move to
the next row and back again then the Client_RS.HasChanges is true. How can i
get tha Client_RS.HasChanges to return true as soon as the data is entered ?

' Binding Method
' Company Name
strCompanyName.DataBindings.Add(New Binding("Text", Client_RS,
"TBL_ClientAdmin.CompanyName"))

any ideas please
Jul 18 '06 #1
1 1068
Peter,

You can try the endcurrentedit method.
That is to push data into the datasource without changing the current
position.

http://msdn2.microsoft.com/en-us/lib...rrentedit.aspx

(By the way, using RS in an abbrivation for a DataSet is very misleading in
my idea, a DataSet is a wrapper around DataTables, which is the most to
compare with a classic RecordSet)

I hope this helps,

Cor

"Peter Newman" <Pe*********@discussions.microsoft.comschreef in bericht
news:86**********************************@microsof t.com...
>
I have a problem i donr seem to be able to find a soloution to

i have created a dataset, binded the controls to it, set primary keys
managed to set up navigation through the table
and even search for a value and move to that record. I have now come to
an
abrupt halt with something i thought would be simple ..
updating records.

I have tried using the Client_RS.HasChanges(DataRowState.Modified)
function
( Client_Rs being my Dataset )
but im not getting the expected result.

If make changes in the strCompanyName textbox, and check to see if the
Client_RS.HasChanges is true it isnt its still false, however if i move
to
the next row and back again then the Client_RS.HasChanges is true. How
can i
get tha Client_RS.HasChanges to return true as soon as the data is entered
?

' Binding Method
' Company Name
strCompanyName.DataBindings.Add(New Binding("Text", Client_RS,
"TBL_ClientAdmin.CompanyName"))

any ideas please

Jul 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. ...
1
by: Andy | last post by:
Hello, I have a WebService that sends a client a DataSet as XML (I use a DataSet.GetXml to get the XML). The DataSet is filled by a DataAdapter in the WebService. The client coverts the XML Back...
3
by: Jeronimo Bertran | last post by:
Hi, I have an xml file that encapsulates a dataset definition within a set of tags (<dataset>)... here is an example <?xml version="1.0" encoding="utf-16"?> <dataset> <MyTable>...
2
by: JS | last post by:
I'm trying to create a data layer and having problems returning a DataSet from my code that's in a class module. Please forgive me. I'm new to C# (VB'er). I decided to create my data layer in...
5
by: Mike | last post by:
I need to expand the DataSet class by inheriting from it and adding functions that work on the data in the tables. However, since I can't upcast how can I get my base DataSet object assigned an...
5
by: Christian Ahrenkiel | last post by:
Hi, I've got a DataSet (ds) which was created by a DataAdapter (da) method: ds.Fill(ds). This DataSet is passed through various methods (by value). Each method changes some fields in the...
2
by: John Holmes | last post by:
I have a web interface where the user types in ID's one at a time. After an ID is typed in, a button is clicked and the button click event has code that does a query and returns a data reader and...
22
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to...
1
by: matt | last post by:
hello, i have a web app that allows users to query our oracle db and produce a dataset of report data. they then have the option to serialize this data and store it in the database. later, then...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.