|
-
Mar 27th, 2009, 04:28 PM
#1
Thread Starter
New Member
Child tables primary Key not generated automatically
(VS2005 Professional)
My database's layout is as follows:
Identification (Parent table)
ID# (Primary Key, auto increase)
First Name
Last Name
....
Address (child table)
ID# (FK constraint to parent table)
AddressID(PK, auto increase)
Block #
StreetName
...
Vehicles(child table)
ID# (FK constraint to parent table)
VehiclesID(PK, auto increase)
color
....
I am placing this three tables in three tabs by a tabcontrol. If I put two child tables in dataGridView in their tab, the insert(new record)/update to the tables works very well. When I put the child tables in details View, I can't get a new record updated. The problem with details view is that there is no AddressID and VehiclesID generated. In dataGridView, these IDs are automatically generated whenever a mouse enters into a cell in a row.
Would someone please help? Please let me know if you need more details on my project.
Thank you!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|