954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Database

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

Attachments Provdatabas.zip (10.26KB)
bonzo2008
Light Poster
Team Colleague
27 posts since Apr 2011
Reputation Points: 10
Solved Threads: 0
 

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'.

Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
 

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

bonzo2008
Light Poster
Team Colleague
27 posts since Apr 2011
Reputation Points: 10
Solved Threads: 0
 

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.

Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
 

Thanks very much for the help

bonzo2008
Light Poster
Team Colleague
27 posts since Apr 2011
Reputation Points: 10
Solved Threads: 0
 

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

Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You