Click here to Skip to main content
15,913,027 members
Home / Discussions / Database
   

Database

 
AnswerRe: how to querry for list of branches for each company Pin
Mycroft Holmes21-Mar-10 0:43
professionalMycroft Holmes21-Mar-10 0:43 
Questionhow to write querry for expired date Pin
developerit21-Mar-10 0:06
developerit21-Mar-10 0:06 
AnswerRe: how to write querry for expired date Pin
Mycroft Holmes21-Mar-10 0:40
professionalMycroft Holmes21-Mar-10 0:40 
GeneralRe: how to write querry for expired date Pin
developerit21-Mar-10 1:13
developerit21-Mar-10 1:13 
Questionsample code of oracle & c# Pin
amer shammout20-Mar-10 21:34
amer shammout20-Mar-10 21:34 
AnswerRe: sample code of oracle & c# Pin
Mycroft Holmes21-Mar-10 0:36
professionalMycroft Holmes21-Mar-10 0:36 
QuestionMultiple Tables in MS Access Database ! Pin
jeshra27920-Mar-10 19:40
jeshra27920-Mar-10 19:40 
AnswerRe: Multiple Tables in MS Access Database ! Pin
Mycroft Holmes21-Mar-10 0:29
professionalMycroft Holmes21-Mar-10 0:29 
I think you are referring to referential integrity and how to create and maintain a relationship between class and section.

In your tables you need to have key fields something like this

ClassID
Class

SectionID
ClassID
Section

ClassID and SectionID are auto increment field and are the primary keys to their tables. When you insert a record in the Class table you should get back the ClassID from the insert method (in SQL Server it is with @@Identity or @Scope_Identity).

You now need to use this ClassID when inserting the record into the Section table. Generally these type of linked inserts are wrapped in a transaction so if a Class insert fails then you do not insert a Section record with no related Class record.

I suggest you get a book on databases and start working through the examples, you will struggle if you try to use a forum for your primary learning tool.
Never underestimate the power of human stupidity
RAH

GeneralRe: Multiple Tables in MS Access Database ! Pin
jeshra27925-Mar-10 1:32
jeshra27925-Mar-10 1:32 
QuestionC# winform -> SQL server Trouble writing null values Pin
Mattzimmerer20-Mar-10 10:26
Mattzimmerer20-Mar-10 10:26 
AnswerRe: C# winform -> SQL server Trouble writing null values Pin
i.j.russell20-Mar-10 12:19
i.j.russell20-Mar-10 12:19 
GeneralRe: C# winform -> SQL server Trouble writing null values Pin
Mattzimmerer20-Mar-10 12:44
Mattzimmerer20-Mar-10 12:44 
Questionoracle & .net Pin
amer shammout20-Mar-10 4:17
amer shammout20-Mar-10 4:17 
QuestionRe: oracle & .net Pin
i.j.russell20-Mar-10 8:51
i.j.russell20-Mar-10 8:51 
GeneralRe: oracle & .net Pin
amer shammout20-Mar-10 21:24
amer shammout20-Mar-10 21:24 
AnswerRe: oracle & .net Pin
Don Burton21-Mar-10 10:31
Don Burton21-Mar-10 10:31 
GeneralRe: oracle & .net Pin
amer shammout21-Mar-10 21:42
amer shammout21-Mar-10 21:42 
AnswerRe: oracle & .net Pin
Аslam Iqbal26-Mar-10 10:38
professionalАslam Iqbal26-Mar-10 10:38 
GeneralRe: oracle & .net Pin
amer shammout28-Mar-10 2:03
amer shammout28-Mar-10 2:03 
QuestionPermissions Problem? [SOLVED] Pin
#realJSOP20-Mar-10 3:31
professional#realJSOP20-Mar-10 3:31 
AnswerRe: Permissions Problem? Pin
Luc Pattyn20-Mar-10 3:38
sitebuilderLuc Pattyn20-Mar-10 3:38 
GeneralRe: Permissions Problem? Pin
#realJSOP20-Mar-10 3:40
professional#realJSOP20-Mar-10 3:40 
GeneralRe: Permissions Problem? Pin
Luc Pattyn20-Mar-10 3:53
sitebuilderLuc Pattyn20-Mar-10 3:53 
GeneralRe: Permissions Problem? Pin
#realJSOP20-Mar-10 3:50
professional#realJSOP20-Mar-10 3:50 
QuestionRetrieving the lastest instance of a record [ SOLVED] Pin
#realJSOP20-Mar-10 2:53
professional#realJSOP20-Mar-10 2:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.