I am currently writing a VB.Net application that uses Random Access File storage to store all the records.
I have been able to write/find and delete records from the random file however i also wish to update records once i have searched for them.
When the update takes place that's where my problems occur.
Once i have updated the record, then go to enter a new record it continues to produce copies of the updated record regardless of the entry details for the new record.
The code for my Update Button is as follows:
1: Dim OneMember As MemberType 2: FileOpen(1, Filename, OpenMode.Random, , , _Len(OneMember)) 3: Seek(1, NumberOfRecords) 4: OneMember.MemberID = Val(txtSID.Text) 'Update _MemberInfo 5: OneMember.Title = cboSTitle.Text 6: OneMember.FirstNames = txtSFName.Text 7: OneMember.Surname = txtSSName.Text 8: OneMember.DOB = txtSDOB.Text 9: OneMember.AddressLine1 = txtSAddressL1.Text 10: OneMember.AddressLine2 = txtSAddressL2.Text 11: OneMember.PostCode = txtSPCode.Text 12: OneMember.Email = txtSEmail.Text 13: OneMember.Tele = txtSTele.Text 14: OneMember.Mob = txtSMob.Text 15: FilePut(1, OneMember, ) 16: FileClose(1)
I would greatly appreciate any input for my problem, thank you.