Problem navigating an access database.

Apr 26 2004 9:23 AM
Hi All, Can anyone help? I am fairly bew to c# and I'm a bit stuck!! I have class that I want to connect to an access databse. /////////////////////////////////////////////////////////////////////////// public class OldCustomer : ICustomer, IControllerCust { /// Component customer properties. private int ptyCustomerID = 0; private string ptyCustomer_Surname= "None"; private string ptyCustomer_Forname = "None"; .........etc //////////////////////////////////////////////////////////////////////////// Connecting to the database is fairly straight forward but I can't seem to find a way to iterate through the records and assign them to the properties i.e ///////////////////////////////////////////////////////////////////////// public string Customer_Surname { get { return ptyCustomer_Surname; } set { ptyCustomer_Surname = value; } } public string Customer_Forname { get { return ptyCustomer_Forname; } set { ptyCustomer_Forname = value; } } ////////////////////////////////////////////////////////////////// What I want to do is have a MoveNext() method that will go to the next record in the dataset and assign the values to th above properties. It seems easy enough on a form class, all you do is bind a text control to the column and use the position method to iterate through the dataset. If anyone can help I would be really grateful. Cheers guys. Shaun.