Click here to Skip to main content
15,893,594 members
Home / Discussions / Database
   

Database

 
AnswerRe: update table with split function Pin
leckey23-Jul-09 10:10
leckey23-Jul-09 10:10 
AnswerRe: update table with split function Pin
Robin_Roy27-Jul-09 17:25
Robin_Roy27-Jul-09 17:25 
QuestionMSMQ Performance Monitoring Pin
UmaMahesh suda23-Jul-09 3:08
UmaMahesh suda23-Jul-09 3:08 
AnswerRe: MSMQ Performance Monitoring Pin
leckey23-Jul-09 10:14
leckey23-Jul-09 10:14 
QuestionExecuteScalar() Pin
sandhya1422-Jul-09 22:08
sandhya1422-Jul-09 22:08 
AnswerRe: ExecuteScalar() Pin
Mycroft Holmes23-Jul-09 0:54
professionalMycroft Holmes23-Jul-09 0:54 
QuestionSecurity tree structure Pin
Rajeshwar Code- Developer22-Jul-09 20:30
Rajeshwar Code- Developer22-Jul-09 20:30 
AnswerRe: Security tree structure Pin
infneeta22-Jul-09 21:41
infneeta22-Jul-09 21:41 
What best you can do is to create one table like
ID DepartMent DepartMentData

and make DepartMentData column as xml type where you will store data in
the hierarchal way.
For eg.
There is an admin department so the DepartMentData column may have values like
<Department Name = "Admin">
------<SupportTeams>
----------<SupportUser Name ="SupportUser1" ID="1">
--------------<DeveloperTeam1>
------------------<User Name ="Dev1User1" ID="1"/>
------------------<User Name ="Dev1User2" ID="2"/>
--------------</DeveloperTeam1>
----------</SupportUser>
----------<SupportUser Name ="SupportUser2" ID="2"/>
--------------<DeveloperTeam2>;
------------------<User Name ="Dev2User1" ID="1"/>
------------------<User Name ="Dev2User2" ID="2"/>
---------------</DeveloperTeam2>
-----------</SupportUser>
------</SupportTeams>
</Department >

Now in C# code you could pass the element you want to read Like for eg. you want to read all the users below SupportTeams then you just need to
call:
XmlNodeList ChilNodes = doc.GetElementsByTagName("SupportTeams")
This will return all the child nodes including SupportTeams node.
Now you can iterate through for each node
foreach (XmlNode cNode in ChilNodes )
{
}
In the loop check that each node has further any child node by calling:
if(cNode.ChilNodes!= null)


This way you could ensure that you have not gone to above in the tree hierarchy.
This will always go to below in the tree hierarchy.
AnswerRe: Security tree structure Pin
Mycroft Holmes23-Jul-09 0:56
professionalMycroft Holmes23-Jul-09 0:56 
GeneralRe: Security tree structure Pin
Jeremy Likness26-Jul-09 3:34
professionalJeremy Likness26-Jul-09 3:34 
QuestionAUTO NUmber column in SQL server Pin
jonhbt22-Jul-09 20:02
jonhbt22-Jul-09 20:02 
AnswerRe: AUTO NUmber column in SQL server Pin
Baran M22-Jul-09 20:37
Baran M22-Jul-09 20:37 
Questionoracle query Pin
sandhya1422-Jul-09 18:57
sandhya1422-Jul-09 18:57 
AnswerRe: oracle query Pin
Baran M22-Jul-09 20:34
Baran M22-Jul-09 20:34 
GeneralRe: oracle query Pin
sandhya1422-Jul-09 20:53
sandhya1422-Jul-09 20:53 
GeneralRe: oracle query Pin
Baran M22-Jul-09 21:02
Baran M22-Jul-09 21:02 
GeneralRe: oracle query Pin
sandhya1422-Jul-09 21:37
sandhya1422-Jul-09 21:37 
Questionto include a select query inside an insert query Pin
myinstincts22-Jul-09 10:03
myinstincts22-Jul-09 10:03 
AnswerRe: to include a select query inside an insert query Pin
Blue_Boy22-Jul-09 11:25
Blue_Boy22-Jul-09 11:25 
AnswerRe: to include a select query inside an insert query Pin
Robin_Roy22-Jul-09 16:40
Robin_Roy22-Jul-09 16:40 
Questiondatabase design help Pin
mark_me22-Jul-09 9:46
mark_me22-Jul-09 9:46 
AnswerSearching tables Pin
David Mujica22-Jul-09 10:10
David Mujica22-Jul-09 10:10 
GeneralRe: Searching tables Pin
mark_me22-Jul-09 11:12
mark_me22-Jul-09 11:12 
GeneralRe: Searching tables Pin
Robin_Roy22-Jul-09 16:52
Robin_Roy22-Jul-09 16:52 
GeneralRe: Searching tables Pin
mark_me23-Jul-09 7:27
mark_me23-Jul-09 7:27 

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.