I ahve the follwoing code in a control:
<%@Import namespace="System.Data"%>
<%@Import namespace="System.Data.SqlClient"%>
<script language="C#" runat="server">
DataSet nodeDS = new DataSet();
dataSet GetNodes() {
SqlDataAdapter nodeAptr = new Sql........
nodeAptr.Fill(nodeDS, "nodes")...
I need to make some xml that will make a tree node out of 1 (if possible) result set... How would you suggest I do this... I want to make 1 query and then loop through it to produce something like:
parent 1
--- child 1a
--- child 1b
--- child 1c
parent 2
--- child 2a
---...
I need a query to produce a tree node - something like:
parent 1
--- child 1a
--- child 1b
--- child 1c
parent 2
--- child 2a
--- child/parent 2b
--- child 2b1
--- child 2b2
all of these are in the same table that looks something like:
id parentID hasChild...
I need to do a between query on a varchar field that looks like, for example, 12 DEC 2007
so something like ...where field1 between '12 DEC 2007' and '12 JAN 2008'
is there a way to do this?
I see the calendar control comes with the buttons to change the moths... is there a way to add buttons to change the year? so with one click I can go from mar 2007 to mar 2006?
I have the following query (thanks gmmastros)
Select A.Name + '/' + B.Name As OutputColumn
From TableName A
Inner Join TableName B
On A.Id = B.ParentId
Union All
Select Name
From TableName
Where ParentId = 0
Order By OutputColumn
Now, I need to do one change to it. I...
Given the follwoing table:
id name parentid
1 aaa 0
2 bbb 0
3 ccc 0
4 ZZZ 1
5 YYY 1
6 XXX 3
How can I make a query to produce the follwoing strings:
aaa
aaa/ZZZ
aaa/YYY
bbb
ccc
ccc/XXX
I have a custom validator that calls a function:
function val_con1 () {
if (document.all.formname.conname.value == "") {
args.IsValid=false;
return;
}
now this works, as in it does not submit the form and it shows the error message, but I also get a javascript error on the...
I am inner joining to a table that may or may not have corresponding records. For example, say I have the following tables
TableA
id col1
1 aa
2 bb
3 cc
4 dd
5 ee
TableB
id Aid col1
1 3 xx
2 4 yy
I want to do a join with b from a...
I am trying to find some easy ways to grab row count info on a paging data grid. bascially, I am wanting to make a "You are viewing items 25-50 of 728"
I can gab the "728" via xxx.tables["yyy"].Rows.Count but I need to find a way to grab the count of the first item (I can then just add 25 to it...
I know there has to be an easy way to do this, I just do not have the experience to know... I have a data grid that lists a number of records and has a link for each "view details" I want the details to show up above the datagrid... the problem is that when I am paging through the results (say...
In a datagrid, I have a bound column. My question is: Is it possible to put a variable into the HeaderText of a bound column? So the Headertext is not always the same?
I there a way to order a table you are joping with? The problem is I have atable that I need to join with that could return multiple records on the join, I want to only return the latest entry (by a date field). Is this possible?
I have three tables
tbl_main
id officeID title
1 2 aaaaa
2 2 bbbbb
3 4 ccccc
tbl_offices
id groupID title
1 2 officeA
2 2 officeb
3 1 officec
tbl_group
id groupname
1 groupA
2...
What is the recommended way to move a site from one server to another... I tried exporting a package in FrontPage, but the site did not transistion well, and does not look the same....
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.