Click here to Skip to main content
15,921,716 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: How Can I retrive Client PC MAC address Pin
krishnaveer18-Aug-09 22:04
krishnaveer18-Aug-09 22:04 
GeneralRe: How Can I retrive Client PC MAC address Pin
N a v a n e e t h18-Aug-09 22:21
N a v a n e e t h18-Aug-09 22:21 
GeneralRe: How Can I retrive Client PC MAC address Pin
Christian Graus18-Aug-09 23:20
protectorChristian Graus18-Aug-09 23:20 
Questionretrive child and sub child from table [modified] Pin
Punit Belani18-Aug-09 20:46
Punit Belani18-Aug-09 20:46 
AnswerRe: retrive child and sub child from table Pin
Blikkies18-Aug-09 20:52
professionalBlikkies18-Aug-09 20:52 
GeneralRe: retrive child and sub child from table Pin
Punit Belani18-Aug-09 20:57
Punit Belani18-Aug-09 20:57 
AnswerRe: retrive child and sub child from table Pin
padmanabhan N18-Aug-09 20:57
padmanabhan N18-Aug-09 20:57 
AnswerRe: retrive child and sub child from table Pin
N a v a n e e t h18-Aug-09 21:57
N a v a n e e t h18-Aug-09 21:57 
Since you asked about query, here is a possible implementation using stored procedure.

1 - Write a stored procedure that takes a parent id.
2 - Do a select to get all the children of the supplied parent id and assign it to a T-SQL cursor.
3 - Iterate over all of the children.
3.1 - Add row into a temporary table
3.2 - Call this procedure again (recursive) by passing the child id as parent id. Goes to step 2
4 - Select all the rows from the temporary table if @@NESTLEVEL is 1.
5 - Drop temporary table, de-allocate cursor.

Note: SQL server has a stored procedure nesting limit. I guess it is 32. So if you have an item which is nested more than 32 levels, you will get error. In such case, you need to handle this in the application code rather than on a procedure.

Also you need to make sure that the temporary table is getting created only once, that is when the procedure starts executing for the first time. All the nested calls will get the temporary table created on the first call.

This can be done in a better way using C# (or whatever language you use).


GeneralRe: retrive child and sub child from table Pin
Punit Belani18-Aug-09 22:33
Punit Belani18-Aug-09 22:33 
GeneralRe: retrive child and sub child from table Pin
N a v a n e e t h18-Aug-09 22:58
N a v a n e e t h18-Aug-09 22:58 
AnswerRe: retrive child and sub child from table Pin
Abhishek Sur18-Aug-09 22:03
professionalAbhishek Sur18-Aug-09 22:03 
GeneralRe: retrive child and sub child from table Pin
Punit Belani18-Aug-09 22:30
Punit Belani18-Aug-09 22:30 
Questiongetting the value in javascript Pin
RajaAhmed18-Aug-09 19:54
RajaAhmed18-Aug-09 19:54 
AnswerRe: getting the value in javascript Pin
Christian Graus18-Aug-09 21:05
protectorChristian Graus18-Aug-09 21:05 
GeneralRe: getting the value in javascript Pin
RajaAhmed18-Aug-09 21:07
RajaAhmed18-Aug-09 21:07 
GeneralRe: getting the value in javascript Pin
Christian Graus18-Aug-09 21:14
protectorChristian Graus18-Aug-09 21:14 
GeneralRe: getting the value in javascript Pin
RajaAhmed18-Aug-09 21:19
RajaAhmed18-Aug-09 21:19 
GeneralRe: getting the value in javascript Pin
Christian Graus18-Aug-09 21:34
protectorChristian Graus18-Aug-09 21:34 
QuestionHow can I drag and drop listbox items into another listbox Pin
biyon18-Aug-09 19:53
biyon18-Aug-09 19:53 
AnswerRe: How can I drag and drop listbox items into another listbox Pin
Christian Graus18-Aug-09 21:06
protectorChristian Graus18-Aug-09 21:06 
GeneralRe: How can I drag and drop listbox items into another listbox Pin
biyon19-Aug-09 18:10
biyon19-Aug-09 18:10 
Questionusing Web services in a none standard way Pin
shabya18-Aug-09 19:17
shabya18-Aug-09 19:17 
AnswerRe: using Web services in a none standard way Pin
Christian Graus18-Aug-09 19:28
protectorChristian Graus18-Aug-09 19:28 
GeneralRe: using Web services in a none standard way Pin
shabya18-Aug-09 19:41
shabya18-Aug-09 19:41 
GeneralRe: using Web services in a none standard way Pin
Christian Graus18-Aug-09 21:07
protectorChristian Graus18-Aug-09 21:07 

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.