473,405 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

SQL SERVER Table to XML

Hi All,

Just looking for a few pointers here. I have been giving the task of
pulling a table from an SQL Server, to do this, I simply created a
class, and return a List (of <class>). This all works fine, now what I
wish to do is find a way to irritate through this list, and generate a
XML file to be used with a treeview control. The database is very simple
in structure, it only has 4 fields, so the number of passes required
should be minimal.
I know that SQL Server 2005 can provide data in an XML format, however
this isn't an option as It would require 2 calls to the database, as
more than one thing is actually being done with the data received.

I do not know if this is valid or not, but I have included my Database
design specs:

KeywordIndexID int Unchecked (Primary Key)
Keyword varchar(100) Unchecked
PlacementBelowID int Unchecked
DisplayComments bit Checked

Basically If an Item has a PlacementBelowID of 4, then it is a subnode
of the node with item 4 as the KeywordIndexID within the treeview.

If anyone can offer me any pointers I would be most grateful.
And if you need clarification on any thing I have stated here, please
don’t hesitate to ask.

Thanks

P.s:

I do not know if required, but my Class file is below

Imports Microsoft.VisualBasic
Imports Microsoft.ApplicationBlocks.Data
Imports System.Data.SqlClient
Imports System.Collections.Generic

Namespace Keywords
Public Class Keywords

Private _KeywordIndexID As Integer
Private _Keyword As String
Private _PlacementBelowID As Integer
Private _DisplayComments As Boolean

Public Property KeywordIndexID() As Integer
Get
Return _KeywordIndexID
End Get
Set(ByVal value As Integer)
_KeywordIndexID = value
End Set
End Property

Public Property Keyword() As String
Get
Return _Keyword
End Get
Set(ByVal value As String)
_Keyword = value
End Set
End Property

Public Property PlacementBelowID() As Integer
Get
Return _PlacementBelowID
End Get
Set(ByVal value As Integer)
_PlacementBelowID = value
End Set
End Property
Public Property DisplayComments() As Boolean
Get
Return _DisplayComments
End Get
Set(ByVal value As Boolean)
_DisplayComments = value
End Set
End Property
End Class
End Namespace
Oct 22 '06 #1
0 835

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
13
by: Jeager | last post by:
Why is it, Microsoft manage to write operating systems and office applications with every bell and whistle facility known to man. Yet, even after years and years of development they still cannot...
7
by: iqbal | last post by:
Hi all, We have an application through which we are bulk inserting rows into a view. The definition of the view is such that it selects columns from a table on a remote server. I have added the...
4
by: banz | last post by:
Hello I have a problem to resolve: I wrote a Perlscript which caches data from a server (local on my machine) I would like to have a other connection to a remote server but I don't know how to...
20
by: Guadala Harry | last post by:
In an ASCX, I have a Literal control into which I inject a at runtime. litInjectedContent.Text = dataClass.GetHTMLSnippetFromDB(someID); This works great as long as the contains just...
19
by: Steve Franks | last post by:
I am using VS.NET 2005 beta 2. When I run my project locally using the default ASP.NET Development Web Server it runs using a root address like this: http://localhost:11243/testsite/ However...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
21
by: lesperancer | last post by:
I've got an access97 reporting mdb that pulls data (77,000 rows) from a sql server table into a local table to run reports if the local table is part of the reporting MDB, the insert statement...
3
by: graphicssl | last post by:
Okay, so first of all, I'm a designer first and a light coder second (I'm only really trained with HTML and CSS). So I apologize for having to post about something that's probably super-trivial! ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.