problem with project

loveonfire4u

New member
Joined
Jan 18, 2006
Messages
3
Programming Experience
Beginner
I have oledb connections and everythin regardin adding info , my problem is when i fetch data which is easily done , my data record shows me last row of my db not the first 1s in start , i dont know where i m makin mistake see if any 1 can find the mistake and guide me with it . It is Visual basic 2005 project k
 

Attachments

  • Forms.zip
    131.8 KB · Views: 32
I'm running VB2003 so I can't open the project but I can look at some code.
Looking at the Emp_edit form code:

Private m_RowPosition As Integer = 0

That is where you assign row position to 0 (first Row), yet you never utilize this variable to actually navigate through the datatable.
Start by tracking the value of this variable and also tracking the actual row number of the datatable to see if you are actually navigating through the datatable or just displaying data from a specific row number.
Curious use of the ShowCurrentRecord() sub also.

Do some quick investigation into Datasets and databinding.
The things you are trying to do here are easily accomplished by binding the textboxes to the fields in the dataset - no need to call a show current record sub.
In VS2003 the dataform wizard would create all the code for you, give it a try in vs2005 and get familiar with the underlying code. It will create add, update and delete functions for you.


 
Back
Top