SQL table to XML Conversion for a tree control

hi,

I have a SQL Table in the below format

Code | Item1 | Item2 | Item3

C1	01	00	00
C2	01	01	00
C3	01	02	00
c4	01	02	01
c5	01	02	02

here 00 indicates level 0,01 indicates level 1 and so on.

I need this to be displayed in a treeview (XML format) 

can XML format can be recived from SQL Server2000 itself or it has to
be done using TreeView Control and generating the XML from the
dataset?

Thanks in advance
-Satish
0
7/3/2003 9:36:57 AM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
614 Views

Similar Articles

[PageSpeed] 33

Hi,

generating XML in the database:
http://www.codeproject.com/useritems/SqlXmlTreeView.asp

Generating XML from DataSet and using XSLT to transform it for TreeView
http://www.aspalliance.com/joteke/treeviewarticle/article.aspx

-- 
Teemu Keiski
MCP, Designer/Developer
Mansoft tietotekniikka Oy
http://www.mansoft.fi

ASP.NET Forums Moderator, www.asp.net
AspAlliance Columnist, www.aspalliance.com

Email:
joteke@aspalliance.com
"Satish" <techsatish@rediffmail.com> wrote in message
news:68009f14.0307030136.2baed573@posting.google.com...
> hi,
>
> I have a SQL Table in the below format
>
> Code | Item1 | Item2 | Item3
>
> C1 01 00 00
> C2 01 01 00
> C3 01 02 00
> c4 01 02 01
> c5 01 02 02
>
> here 00 indicates level 0,01 indicates level 1 and so on.
>
> I need this to be displayed in a treeview (XML format)
>
> can XML format can be recived from SQL Server2000 itself or it has to
> be done using TreeView Control and generating the XML from the
> dataset?
>
> Thanks in advance
> -Satish


0
joteke (20)
7/6/2003 12:41:09 PM
Reply:

Similar Artilces:

how to create a chart from a dynamic table of data?
hai!! i need to create a chart from a dynamic table,meaning that the table is auto-generated from database after clicking a button.This is my first time using macro in excel, so i'm not really well in it. my idea right now is using Chart.Add,but then i'm having problem on how to define the cells selection(i must do "the do..loop statement" rite?) ur help is very appreciated,tq! Use the macro recorder as a guide. When I record a macro to create a simple chart it looks like: Sub Macro1() ' Macro recorded 7/30/2007 by Jon Peltier ' Charts.Add ActiveChart.Ch...

Ordering to Lowest Cost Vendor
GP 8.0, SQL Hi, we are a retailer with two sites under one company. Each site has it's own vendors. We want to use Purchase Order Generator to order from the site-specific vendor with the lowest cost. I tried changing the items so that PO Generator orders using vendor with lowest cost. However, this selects the lowest cost vendor among all the vendors for an item, and there doesn't appear to be a way to designate a vendor as site specific (other than using a naming convention which we have done). Here's the problem: We are a two-store retail chain set up under a single com...

Calculated items/fields in pivot table
Dear all, I am new to excel pivot table and I would like to ask you all a question regarding the calculated items/fields in pivot table. I am making a pivot table whose data source is shown below: Team Salesperson Amount Sold Price each Team Person Amount Sold Price each Paper A 50 35 Paper D 60 25 Pen D 500 4 Desk C 20 400 Desk A 10 700 Pen B 700 3.5 Clip B 500 2.5 Clip C 600 2 Desk B 15 600 I am thinking if it is a way to add a field in the pivot table which can show the total sale of each Team. For e...

Pivot tables remember values that are not available anymore
Hello everyone I would like to ask you is it is possible to reset the fields in a pivot table to make disapear values that they are not anymore available on the data form the selection-criteria when a fields is drill down example lets make a simple table like :: uno dos tres a q 1 s q 2 d q 3 f q 4 g q 5 a w 6 s w 7 d w 8 f w 9 g w 0 make a pivot table and drilldown "uno" (row fields), drillacross "dos" (column fields) and "tres" as Data-Items so in the selection criteria for "uno" ...

A/P Tables
Hi, Which table(s) contain(s) the A/P checks/payments? Which column hold the check number? Are payments via credit-card in the same table(s) with checks? Many thanks, -Itai You can find this information in the SDK found on the second Great Plains cd. Payments are payments. The type is a column in the table. "Itai" wrote: > Hi, > Which table(s) contain(s) the A/P checks/payments? > Which column hold the check number? > Are payments via credit-card in the same table(s) with checks? > Many thanks, > -Itai > > > > > Charles, The SDK indic...

Access 2007 & Printer control codes
My (POS) printer needs to receive the following - I think it is called escape sequence code "LPRINT CHR$(29); CHR(86); CHR$(48)" in order to activate the paper cutter at the end of a print report. Where and how do I have to place this on the print report form? Any ideas or clues? Thanks, Vassilis I haven't worked with printer control codes for a very long time, but you could try putting a textbox at the end of your report and assigning it's control source as: =chr$(29) & "; " & chr$(86) & "; " & chr$(48) That assumes the semi-colo...

MnyBank : Ofc Ofx file conversion and Money import (V1.5.17)
Version 1.5.17 - Batch file conversion from CSV, QIF, OFC, OFX V1, OFX V2 (xml) to OFX V1, OFX V2 (xml), Excel (xml), - Demo at http://ferraroa.dyndns.org:8200/MnyBank/help/ with online conversion from OFC, OFX V1, OFX V2 (xml) to OFX V1, OFX V2 (xml), Excel (xml). A test file can be downloaded from the web not to use private data for testing. Version 1.5.16 : - Can save data into Excel Xml files (File/Save As) - Setting wizard in french and english - New link : http://ferraroa.dyndns.org:8200/MnyBank/bin/MnyBank.zip Version 1.5.12 : english help file and documentation (except...

Sorting PO.XML and PORCV.XML File
Is it possible to set how the Po.xml and porcv.xml files are sorted? I know they will sort based on how the Items are sorted in the contents tab, The problem I am having is that I need to sort based on the BinLocation and it is not one of the fields on the Contents tab. Any Ideas? Thanks, Butch This is a multi-part message in MIME format. ------=_NextPart_000_0619_01C75557.A2B44F70 Content-Type: multipart/alternative; boundary="----=_NextPart_001_061A_01C75557.A2B44F70" ------=_NextPart_001_061A_01C75557.A2B44F70 Content-Type: text/plain; charset="iso-8859-1" Cont...

Pictures don't display in tables
Have been inserting jpegs into word tables for years. Suddenly the picture doesn't display in normal or print mode. Instead I get an border. If I click inside of the border the drag handles appear but they are not active. It's a pain I can live with as the pictures do print however, I can't size them. What have I messed up? -- Joe Hi Joe, You might want to check if you have the option "Show picture placeholders" enabled? Its help text indicates "Display an empty box in place of each graphic in the document to improve scrolling performance....

Unable to insert record in table
Hi, Using SQL Server 2005. I have a table with one required field (key field, var type int) and various other optional fields. Yesterday, my Access VBA code failed to action the following SQL statement: INSERT INTO ORDERS (OrderID) VALUES (9121165) I got a time out error and a report that the record could not be inserted (error code -2147217887). So I opened SQL Server Managment studio and opened the table. When I tried to insert a new record using the same OrderId, I first got a timeout error and could not add the record. AFter OK'ing the error, I was able to cli...

Looking up data from a table conditionally
Hello, I would like to know how to create a formula that looks at a value in one cell, uses that value to find a corresponding value in a separate table, and then enters that value in my sheet. For example, say I want a value to appear in cell B1 based on the value in cell A1. If the value in cell A1 is "B", and the value in a separate table that corresponds to "B" is $500, I want the formula in cell B1 to return the value "$500". Any ideas on how to do this? Thanks, Eric Classic application for the VLOOKUP formula......... =VLOOKUP(A1,YOURTABLE,2,FALS...

Data conversion problem
I am new to excel macro. I am importing data from SQL server into excel. My script within DTS job creates the file using a template and populate the sheets. The query runs fine and the data gets populated. But the problem is that all the numeric fields are in wrong data type. It looks like they are all character and there is a small green arrow at the top of each field. What do I need to do to convert them to number as soon as the sheet finished populating? I tried formatting my template, but did not work. The number of record change with every run. Any suggestion?? Biti >>What d...

SQL Maintenace Plan
OK, I have combed this newsgroup, and I am more confused than when I started. I went into SQL and used the wizard to create a maintenance plan. I checked the backup files a few days later and I have 14GB (!) of files and transaction logs from three days of backups. Can someone give me a step by step, dumbed-down version of how to use the Maintenance Plan wizard in SQL to create a good backup plan for CRM? Here's my scenario: -CRM server is SBS2003 box -There are approximately 30,000 leads/contacts in CRM and several hundred thousand activities. I would like to do Full backups rather...

Pivot Table
In my Pivot Table, I have all the column headers formatted to "wrap text". When I select new data to display in the pivot table, it removes the wrapping on the column headers. I've deselected the AutoFormat Table option, but the behavior continues. Any way around this? You may have to enable selection (From the Pivot toolbar, choose PivotTable>Select, and click on Enable Selection) Before formatting cells, instead of selecting the entire column, use the selection feature to select the items in the description field. For example, move the pointer to the top of a column ...

Need Records from 2 Tables
I have an Employee table in Access that is updated weekly from a Payroll system. If someone is terminated, they will no longer be in this table. It was suggested I create a "History" table to keep from losing these terminated records. BUT, this would mean when I query to find an associate, I would need to look at all the records from the Employee Table, and just the unmatched records in the "History" table. With what I know of joins, there isn't a way to do this. So what do I do? Any help would be greatly appreciated!! PB, If you move the terminated empl...

Displaying on a controls
Hi, I want to display a text on a button control and static control from a my program. I tried doing SetButtonText() API , but it is not displaying it on a button control. Is their any API's to display a text on a" Button" and "Static" controls. SetWindowText joe On 28 Feb 2007 20:35:50 -0800, "lucky" <Laxmanmaruthy@gmail.com> wrote: >Hi, > >I want to display a text on a button control and static control from a >my program. >I tried doing SetButtonText() API , but it is not displaying it on a >button control. > >Is thei...

Automated Data Migration from Sql Server 2005
Hello Everybody, I am having the following requirement : It is required to transfer data from Sql Server 2005 to Microsoft CRM Server 3.0 on daily basis and in some cases weekly basis. This should be done without Manual interaction. Can anybody suggest me How to do so ? Thanks in advance. Hi, If somebody can tell me if SDK or Data Migration Pack Can be useful in this context. Thanks "Misha" wrote: > Hello Everybody, > > I am having the following requirement : > > It is required to transfer data from Sql Server 2005 to Microsoft CRM Server > 3.0 on da...

Pivot table from Multiple Consolidation Ranges
Dear All Excel Experts, Creating a Pivot Table from 1 data table in 1 worksheet gives me the Pivot Table the way I want it, meaning as many Page Fields as I defined them at the top left of the Pivot Table. These Page Fields represent the column lables and in the drop-down I can choose the data under that lable of the respective column. Now I wish to have precise the same Pivot Table, but this time from data tables spread over several worksheets, whereby the format of these data tables are exactly the same. But now the drop-down of the Page Fields at the top left of the Pivot Table g...

Linked Table
Hi, I have a Access 2003 mdb that I have used for years that has worked OK. Recently one of my queries malfunctioned to an external Progress db's linked table. Specifically, the query's table list is missing many of the fields in the table though when I inspect the linked table in the Tables Objects Section I see all the fields. How can I fix my query? TIA, Dan Why post the same question in different newsgroups? (already answered in the other newsgroups you posted in). If your situation is one of the (few) unusual circumstances in which it is necessary/appropriat...

QTY Shipped in Purchasing Line Receipts Table
Does anyone know why the quantity fields in this table have a "currency" storage type in table POP10500? The field type in the SQL table is numeric. I want to do a Smart List showing receipt transactions and the data comes out in currency format in my list. Can this be changed in the database or is there some obscure reason why it's coded this way? If so, where would it be changed? Thanks, Frank Hamelly NOVA Solutions LLC It is a currency field for 2 reasons: 1. It provides QTY's greater than 2.1 billion (limit for long integer). Probably not a real good reason as I&...

Table Definitions #2
Where can I find the table layout and definitions of the object items in each table. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx?mid=7e5ff417-b4b2-49b3-8a3b-e43117c11a2c&am...

Select Statement in query to append to a table
Hello, I have a table with the following Master Stock Code Header ID and I want to append this information to a table, kind of ike a cross tab query but I want the value of the header ID to be in the column not as a column name. I have a max of 12 header id's, so I have 12 column names in the table i want to append to (ie. Hdr1, Hdr2 etc) There could be more than one Header ID per stock code. WHat is the proper syntax for the select statement in my query so I don't get duplicate rows per stock code. ...

How do i get a combo box to enter data in a table from a form?
I want to use a form for data entry. Within that form I have two combo boxes to look up recurring data. When I select an item and expect it to write to another table it does not. What must i do to accomplish this? You'll need to tell us more details about your form's setup and the tables' designs. Your question suggests, though, that you may be storing data redundantly in your database, which usually is unnecessary and may be a source of future data integrity problems. -- Ken Snell <MS ACCESS MVP> "Joe Owens" <Joe Owens@discussions.microsoft.c...

Append Tables
Hi, I have 4 "select" queries that create 4 tables. The tables have different information but are the same dimensions, so I want to append the tables and then export to csv. The only way I know how to do this is to create 4 tables with a "make table" query and then append these 4 and then export. But is there a way to do this without creating another 4 tables - this takes up more space - but just automatically combine with another query and then export the query to a csv file? Thanks Jeff Rather than recreating a "make table" each time, why not crea...

synchronization of Xml file access in .net Pro
Hi, Iam trying to develop a solution for my comapny in MS VS Pro, using C++.net. My work involves extensive usage of xml as well. I use DOM model for xml opeartions. Now the problem scenario is that multiple clients might be using my application as same time and trying to modify/update the same xml file. Therefore i need a mechanism to provide a synchronous access to the xml file. One very obvious solution to this problem is that I use lock on the file access. Other solution can invlove some kind of usage of synclock to lock the block the code accessing/updating the xml file. But i guess bo...