using CurrencyMananger

Signo.X

Well-known member
Joined
Aug 21, 2006
Messages
76
Location
Australia
Programming Experience
1-3
Hello all,

I'm working on a window form, that reads the data from a MS access DB, the form has 2 text boxed, one to display the infomation about the Empyloyee Id and the other one to display information about the employee name, so far all what i did is created 2 text booxes and bind the data from the data base from the desiered field into the text boxes using the databinding property in the form, i could see the first record from the employee id and name perfectely into the text boxes, but then i wanted to move to the next record in the data base, so what i did inside the form_load(....,..) method is created a currency manager var then assinged it to a context binding as the following..

dim cMngs as CurrencyMananger

cMngr = BindingContext(DB1ataset,"tablename")

then i created a button on the form , and in the button on_click event i added :

cMngr.position += 1

when i run the form and click the button nothing happens!! then form should get the next record but it doesnt!!

can any one help please?
also if there you any quick start online tutotrial about similar issues please let me know.

Thanks in advanced!!

~ Signo.X
 
Are you using VS 2005 as your profile indicates or are you using an earlier version? If it's 2005 then use a BindingSource and simply change its Position property.

Also, please use descriptive titles for your threads in future. Everyone posting wants help so using that as the thread title is pointless.
 
thanks for the reply, yes im using VS 2005..

yes it worked ,
another few question :

1. why didnt the currency Manager work in my situation ?
2. as im new to the ADO.NET and windows forms , can you please exmplain in a simple langaue what the difference between
data set and databinding in vs ?


~signo.x
 
Last edited:
1. Doesn't really matter when there's a better way anyway. Haven't used CurrencyManagers directly enough to really know.

2. They are completely unrelated. A DataSet is a container for DataTables and DataRelations, sort of like a local copy of a database. It could contain a complete copy of an actual database, just part of it or possibly more. Data-binding is a mechanism for linking a data source to a control or controls such that any changes made to one will be reflected in the other. A DataSet can be, and often is, used as a data source in data-binding but there is no necessity that a DataSet be the source for a Binding or that the source for a Binding be a DataSet.
 
Back
Top