Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 27th, 2005, 11:35 AM
Authorized User
 
Join Date: Apr 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Table relationships

I have a table which contains all our prospect data. each prospect is uniquely identified by a prospect number. I want to create a second table containing data specific to a particular area of our business but still on a per prospect basis. I realise I have to create a relationship between the two tables using the field ProspectNo. the thing is, how can I have SQl/Access (which is what I'm using for my front end) ensure that a) existing prospect numbers appear in the new table, and b) new prospects receive an entry in both tables. I hope this makes some sort of sense to someone!!

Many thanks in advance

Robert Dolphin
 
Old July 27th, 2005, 12:57 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Nothing is going to do this automatically.. YOu have to code for it in your access app. The relationship just ensures data integraty.

 
Old July 28th, 2005, 02:59 AM
Authorized User
 
Join Date: Apr 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Damn, nothings ever easy. Ok, so next question, how do I go about coding it?

 
Old July 28th, 2005, 09:14 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

You will have to create Insert statements. First insert into your child table, then insert into the parent table. I don't know access, but I am sure it is easy enough.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple relationships from table Vince_421 Access 2 May 30th, 2007 11:34 AM
1 to 1 relationships scandalous Access 13 January 31st, 2007 12:07 PM
relationships - why really? pettrer SQL Server ASP 2 August 31st, 2006 12:59 PM
Table / Field relationships Somed00d Access 2 February 8th, 2006 02:20 PM
contraints and relationships zouky ADO.NET 11 September 24th, 2004 01:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.