Hello

I have made a smal databas but some where I have got a error
when I add a name surname (jones), forename (roger), phone 34567
it is ok but the problem is that when I edit another one
with same surname(jones) and a different forename (david) same phone
then in the list I press jones the first one it is ok
if I then press the other jones the same jones as the first come up.

Suggestions

Its not an error.
When you edit data your program will edit all record with name 'jones'.
Since you didn't have an key/Id to know which 'jones' to edit.
I suggest you to add Id Column as Key. So you can identifier which record to edit even they have the same name.
e.g :

Id  Surename  Forename Phone
1   jones     ward     12345
2   jones     ward     54321

Even they have same name but you can edit current jones with using their 'Id'.

commented: Good point. +2

Shall I put the ID key in the database when I create .

Yes. You need to add one column again as Key to identifier them.
Named it as you want (e.g ID or dbId or dbNum).
With this column every record will get one unique key to be identified.

Thanks very much for the help

You're welcome.
If solved then mark it as solved :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.