Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 27th, 2005, 11:35 AM
Authorized User
 
Join Date: Apr 2005
Location: Wymondham, Norfolk, United Kingdom.
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
Reply With Quote
  #2 (permalink)  
Old July 27th, 2005, 12:57 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
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.

Reply With Quote
  #3 (permalink)  
Old July 28th, 2005, 02:59 AM
Authorized User
 
Join Date: Apr 2005
Location: Wymondham, Norfolk, United Kingdom.
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?

Reply With Quote
  #4 (permalink)  
Old July 28th, 2005, 09:14 AM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:43 PM.


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