get sql server schema to xml?

Hello,

How can I get table/column schema of a sql server database?  i want to
convert the entire schema into an xml file.

thanks in advance.


0
suzy1969 (14)
12/1/2003 8:15:47 PM
dotnet.xml 7266 articles. 0 followers. Follow

5 Replies
609 Views

Similar Articles

[PageSpeed] 4

You can use a DataReader's GetSchemaTable method
"suzy" <suzy@spam.com> wrote in message
news:ckNyb.372$nL5.173@news-binary.blueyonder.co.uk...
> Hello,
>
> How can I get table/column schema of a sql server database?  i want to
> convert the entire schema into an xml file.
>
> thanks in advance.
>
>


0
12/1/2003 8:36:31 PM
Oops, sorry for not posting the link... you  can do it with the Connection
Object as well... here's a pretty good discussion of it..
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconobtainingschemainformationfromdatabase.asp
"William Ryan" <dotnetguru@comcast.nospam.net> wrote in message
news:OvHbdpEuDHA.1512@TK2MSFTNGP10.phx.gbl...
> You can use a DataReader's GetSchemaTable method
> "suzy" <suzy@spam.com> wrote in message
> news:ckNyb.372$nL5.173@news-binary.blueyonder.co.uk...
> > Hello,
> >
> > How can I get table/column schema of a sql server database?  i want to
> > convert the entire schema into an xml file.
> >
> > thanks in advance.
> >
> >
>
>


0
12/1/2003 8:41:33 PM
great thanks.... i will give that a try :)

"William Ryan" <dotnetguru@comcast.nospam.net> wrote in message
news:ugizRsEuDHA.3436@tk2msftngp13.phx.gbl...
> Oops, sorry for not posting the link... you  can do it with the Connection
> Object as well... here's a pretty good discussion of it..
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconobtainingschemainformationfromdatabase.asp
> "William Ryan" <dotnetguru@comcast.nospam.net> wrote in message
> news:OvHbdpEuDHA.1512@TK2MSFTNGP10.phx.gbl...
> > You can use a DataReader's GetSchemaTable method
> > "suzy" <suzy@spam.com> wrote in message
> > news:ckNyb.372$nL5.173@news-binary.blueyonder.co.uk...
> > > Hello,
> > >
> > > How can I get table/column schema of a sql server database?  i want to
> > > convert the entire schema into an xml file.
> > >
> > > thanks in advance.
> > >
> > >
> >
> >
>
>


0
suzy1969 (14)
12/1/2003 9:13:06 PM
The example only lists tables.  Any idea on how to get additional
information in one query? (ie: field/column information)?

"suzy" <suzy@spam.com> wrote in message
news:%9Oyb.245$VQ5.244@news-binary.blueyonder.co.uk...
> great thanks.... i will give that a try :)
>
> "William Ryan" <dotnetguru@comcast.nospam.net> wrote in message
> news:ugizRsEuDHA.3436@tk2msftngp13.phx.gbl...
> > Oops, sorry for not posting the link... you  can do it with the
Connection
> > Object as well... here's a pretty good discussion of it..
> >
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconobtainingschemainformationfromdatabase.asp
> > "William Ryan" <dotnetguru@comcast.nospam.net> wrote in message
> > news:OvHbdpEuDHA.1512@TK2MSFTNGP10.phx.gbl...
> > > You can use a DataReader's GetSchemaTable method
> > > "suzy" <suzy@spam.com> wrote in message
> > > news:ckNyb.372$nL5.173@news-binary.blueyonder.co.uk...
> > > > Hello,
> > > >
> > > > How can I get table/column schema of a sql server database?  i want
to
> > > > convert the entire schema into an xml file.
> > > >
> > > > thanks in advance.
> > > >
> > > >
> > >
> > >
> >
> >
>
>


0
suzy1969 (14)
12/1/2003 10:14:40 PM
If you use the DataReader for example, it gives you all three.
"suzy" <suzy@spam.com> wrote in message
news:B3Pyb.644$VQ5.229@news-binary.blueyonder.co.uk...
> The example only lists tables.  Any idea on how to get additional
> information in one query? (ie: field/column information)?
>
> "suzy" <suzy@spam.com> wrote in message
> news:%9Oyb.245$VQ5.244@news-binary.blueyonder.co.uk...
> > great thanks.... i will give that a try :)
> >
> > "William Ryan" <dotnetguru@comcast.nospam.net> wrote in message
> > news:ugizRsEuDHA.3436@tk2msftngp13.phx.gbl...
> > > Oops, sorry for not posting the link... you  can do it with the
> Connection
> > > Object as well... here's a pretty good discussion of it..
> > >
> >
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconobtainingschemainformationfromdatabase.asp
> > > "William Ryan" <dotnetguru@comcast.nospam.net> wrote in message
> > > news:OvHbdpEuDHA.1512@TK2MSFTNGP10.phx.gbl...
> > > > You can use a DataReader's GetSchemaTable method
> > > > "suzy" <suzy@spam.com> wrote in message
> > > > news:ckNyb.372$nL5.173@news-binary.blueyonder.co.uk...
> > > > > Hello,
> > > > >
> > > > > How can I get table/column schema of a sql server database?  i
want
> to
> > > > > convert the entire schema into an xml file.
> > > > >
> > > > > thanks in advance.
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


0
12/1/2003 10:48:27 PM
Reply:

Similar Artilces:

Can't get a value from a querry into a forms text box
I have a main Shippin Control table, and a main Shipping Control form with description of cargo and quantity text boxes. I have a querry which is a join of tblValues and tblShipping_Control. The SQL is below SELECT Shipping_Control.DescriptionofCargo, Shipping_Control.CargoQty, tblValues.Value, ([Shipping_Control].[CargoQty]*[tblValues].[Value]) AS CommercialValue, Shipping_Control.ShippingDate, Shipping_Control.ShipTo, Shipping_Control.ShipFrom, Shipping_Control.CollectionNoteNo, Shipping_Control.PackingListNo, Shipping_Control.ShipmentID, Shipping_Control.Customer FROM Ship...

ANNOUNCING: MSDN Forums for .NET and XML
You can now discuss issues regarding processing of XML, XSLT and/or XSD using .NET frameworks and the XML Tools in Visual Studio 2005 using the new online discussion forum located at: http://forums.microsoft.com/msdn/showforum.aspx?forumid=38&siteid=1&PageID=0 Cool features include: - Rich text to help make your points clear. - Ability to quickly search the thread for answers before posting your question :-) - Receive email notifications when someone has actually answered your question. - Ability to edit your question after you have posted it. - Active moderation including the a...

How to setup buy 10 get one free
Is there a module that can set rules for the sale of free goods? Suppose a retailer wants to do a special promotion. He wants to give away 1 unit free if a customer buys 10 units of an item. I just had another look at the Extended Pricing module. The documentation suggests that it should be able to do this. Now all I need is the bundled pricing. "jamrock" <news_jamrock@yahoo.com> wrote in message news:eLC9acO9FHA.1032@TK2MSFTNGP11.phx.gbl... > Is there a module that can set rules for the sale of free goods? > > Suppose a retailer wants to do a special promoti...

SQL Replication with CRM 3.0 and 4.0
Hi There Is SQL Replication possible with CRM? Are there any documentation available on this? Thanks in advance ...

Have a display "Paging" through an XML file.
Via an ASPX (and code behind) in .net 2.0 I want to be able to "page" though and display the contents of an xml file. So if there are 100 elements, I can display "page 1 of 4" and list 25 elements per page. How can I do this? Below is the code used to display the XML file // Create XmlDocument and load the XML from file string FilterValue = "Autos"; XmlDocument XmlDoc = new XmlDocument(); XmlDoc.Load(new XmlTextReader(XMLFILE)); //Create the XsltArgumentList to be passed to the xslt doc XsltArgumentList xslArg = new XsltArgumentList(...

Get drive problem
Hello. I am having problem with the getdrive in vba. When I insert a Usb Flash drive it works. When I pull out the flash drive it debugs to the getdrive line in vba. It even debugs and ignors the on error goto err_Error_Click. Trapping the error doesn't work for me. Dim fsH, dH Set dH = fsH.GetDrive("G:") If dH.IsReady Then run my code here End If Is there anyway to solve this problem? Don't know what else to do. Are you sure you're not using vbscript? On Error Resume Next is the only Error trapping available there AFAIK. I hope you init fsH in a way (Early...

Contact Manager without Exchange Server???
My office doesn't use the Exchange server. Can I install and use the Business Contact Manager or the Outlook Contact Manager without the Exchange server??? It's only supposed to work with SBS2003, but can be hacked - see http://www.slipstick.com/bcm/bcmfaq.aspx for more information. On 26 Apr 2004 09:21, =?Utf-8?B?SVQgTmlnaHRtYXJl?= <anonymous@discussions.microsoft.com> wrote: >My office doesn't use the Exchange server. Can I install and use the Business >Contact Manager or the Outlook Contact Manager without the Exchange server??? > > -- Diane Poremsky [M...

Rookie-building DB-want to get right the first time! Help?
Rookie user: Access 2007, Using “Picture Yourself Learning: Microsoft Access 2007” as reference guide. Need suggestions for how to structure what seems to me to be a very complicated DB. I want to build it the best way the first time, so I don’t do a lot of work and not have it do what I need. Here’s what I need to do: Track GIS datasets for about 50 natural and environmental hazards. The data itself does not need to be tracked. I do need to track its source (National, State, County or City data) and know its date of creation, and frequency of updates for example. I don’t k...

How get blank document as default
Every time I ask to open a new doc it goes to one of my own password protected ones. How do I just get a bloody blank document to be default???? See http://word.mvps.org/FAQs/AppErrors/BlankDocNotBlank.htm. -- Stefan Blom Microsoft Word MVP "Frustrated as all get out" <Frustrated as all get out@discussions.microsoft.com> wrote in message news:813F000F-A09E-435C-ADF6-17B8202876E1@microsoft.com... > Every time I ask to open a new doc it goes to one of my own password > protected ones. How do I just get a bloody blank document to be > default????...

Formula to get the current weeknumber
Hi I am trying to get the weeknumber (1 to 52) out of the date. Read somewhere that excel has a WeekNo function but I cant find it. Perhaps I got to old version of excel (ver 2000 9.0.4402 SR-1). Date Weekday Week YearWeek A B C D 1 2005-09-10 Saturday 36 0536 2 2005-12-24 Saturday 51 0551 3 2006-02-07 Tuesday 06 0606 4 5 6 7 As of now I have a ownwritten formula but it doesnt handle years containing 53 weeks correctly. How can I get the weeknumber out of the date? /S Th...

How to change size of a drive on Exchange Server
I have a RAID 5 setup and have divided the space into 4 drives (C, E, F, G). One of the drives is too big (G), and I'd like to reclaim the space and give it to one of the other drives (F). The drive that is too big contains only Exchange transaction logs. Is there a way that I could stop Exchange, temporarily move the transaction logs to F, delete the partition that was G, enlarge drive F (which contains the Exchange database), and then redefine a smaller G partition for the transaction logs, all without losing data? Thanks very much in advance. On Thu, 15 Sep 2005 16:36:02 -0...

How to get the info from form to query to report
I have a form that uses 5 tables for the information so I built a query to have the info all in one place. I also want to use the submit button to send the information to a report to be emailed, right now the report comes in blank. Please help I am fairly new to access and trying to build this for work. Base you report on a query. Use the form reference as criteria in the query like this --- [Forms]![YourFormName]![YourObject] [YourObject] is displaying the data from the 5 tables. -- KARL DEWEY Build a little - Test a little "sandyL" wrote: > I have a form that us...

Which is better
I'm trying to save data from an ADO.NET Dataset to an XML file. The Dataset is made up of 2 tables with a foreign key and a relationship. I don't expect more than a few hundred rows. I'm in the design phase and trying to determine if I should use an external schema or an internal schema. I was hoping someone could help me understand the pros and cons or each option. Thanks in advance. ...

Server 2008 Standard R2
This is server is the host to our Netbackup 6.5.4 Server which is our main backup server for this server enviroment. I'm encountering an issue where I will come in the morning and randomly the server will lose the ability to communicate on the network. What makes it strange is: -There is still a link light -I've updated the nic drivers and this problem still continues -The static ip information is still there -The DNS information is correct -I can log into the server without issue locally and according to Windows Network and Sharing Center there is no issue with the con...

How to get Bills and Budget to synch?
I have Money '07 and I'm using it to try to set up a budget. Problem is, it's a little cumbersome to have to go in and retype each category and amount for things such as rent, gas, cell phone charges, etc. when all of that information is currently in the Bills section. Is there a way to get the budget to grab all of those non-variable values and use them so the only thing I have to manually budget is what's left over? Also, it doesn't seem like the cash flow forecaster (not sure if that's what it's called) is considering my budget items - only the items und...

gp 8, ms project server 2002, sharepoint server 2003
Can these all be installed on the same server? Project server 2002 and SP2003 can (http://support.microsoft.com/default.aspx?scid=kb;en-us;840701). Does GP8 ruin the mix? Pl. advise. Thanks. ------=_NextPart_0001_D682CC7A Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, I would appreciate your patience while I am having tech expert look into this issue. Thanks for using MSDN Managed Newsgroup. Vikrant Dalwale Microsoft SQL Server Support Professional Microsoft highly recommends to all of our customers that they visit the http://www.microsoft.com/protect site and perf...

Where does SmartList get QTY Shipped from?
According to the SDK documentation, the Purchase Line Items standard SmartList gets its data from the POP10110/POP30110 PO Line tables (plus some other master tables). My question is, how does the SmartList come up with the QTY Shipped value for a PO line? As far as I can tell, there's no field in these tables for the shipped quantity. Any ideas? -- Bud Cool, Accounting System Manager HDA, Inc. Hazelwood, MO GP 9.0, SP2 Bud, there's a QTYSHHPD field in POP10500. That may be what you're looking for. Frank Hamelly MCP-GP, MCT East Coast Dynamics www.eastcoast-dynamics.com ...

GP 7.5 MSDE to GP 9.0 SQL 2005 Std.
We have a customer that is running up against the 2GB limit with MSDE. We told them that a) theycould create an historical company and then purge history b) move to SQL Express 2005 or c) move to SQL Std. They don't want to purge history and they aren't sure about future growth so they are looking at going to SQL Std. They also want to go to GP 9.0 Our thoughts are to upgrade them to 9.0 since 7.5 isn't supported on SQL 2005 and then migrate them to SQL 2005 Std. The only problem we can see is maybe hitting the 2GB limit during the upgrade. Any thoughts from anyone? Thanks...

Deleting XML Record from Dataset removing table?
Hi All, When I delete the last record from my dataset and then WriteXML() to the file; the Table itself, in the xml file, is removed. I need to prevent the table structure from being deleted if there are no more records to be written to the XML file from the Dataset. Any ideas here, John. "John" <jrugo@patmedia.net> wrote in message news:eEDs6IW4FHA.400@TK2MSFTNGP09.phx.gbl... > When I delete the last record from my dataset and then WriteXML() to the file; the Table itself, in the xml file, is removed. I > need to prevent the table structure from being deleted ...

MS ACCESS & SQL 2005 Security
We have a 3rd party database that is weak when it comes to security. In order to use a particular tool, users require access to custom db roles which have upd/ins/del permissions on the back end database. We have published this tool through citrix. The business users now wish to access the database using MS Access to run reports directly against some views in the database but they do not want to use MS Access hosted on Citrix. I can give them seperate accounts with only select access to the views but how can I prevent them from connecting directly to the database with their ...

Log Shipping shrink the secondary server.
I have configured a log shipping setup, unfortunately I did not shrink the log file before taking the backup on the primary server. Now I realized that the log file on the secondary server is really big. The DB has been configure to be in standby & redonly mode... Can I shrink the secondary databases log file .. & what would the best method be for it Thanks If the log file needed to be that big on the primary it will also need to be that big on the secondary as well as they will have the same exact transactions applied. I haven't tried it but I see no reason w...

how do i get a template in MS access for managing employees & payr
Dear friends, i intend to design a simple database that can help my organisation manage its employees {departments, addresses, telephone nos, payments(both basic and extras), deductions from salaries, payment types(weekly, monthly, fortnights), contracts (types, terms and duration) and generate monthly details for each employee. Dear Isaac, You don't yet realise that what you have described is not a "simple database". Read widely, on how a relational database works. Here's a site where you can find lots of essential basic material: http://www.accessmvp.c...

Some poor slob installed Ubuntu. Needs to run line commands to get that piece of crap to work
I installed ubuntu 9.10 and it was rebooting just before the login screen. After really long search it turned out it's the video driver, I guess the one coming with ubuntu didn't like my card. I have integrated Radeon HD3200. What worked for me: 1. Select recovery mode from grub menu (in your case for 9.10 too) 2. In the first following screen select "root with networking" to have internet 3. Install video driver package EnvyNG with: sudo apt-get install envyng-core envyng-qt <==================== line commands to get sucky Ubuntu to work. Oops. 4. Run i...

SQL Views for CRM reports
I created an ODBC datasource, some stored procedures and a view in SQL Enterprise manager on which I based and developed a fairly complex Crystal Report. I tried uploading this report to CRM and the error I am getting when trying to open it is this: Crystal Report Viewer: "Failed to load database information. File *****.rpt" Thanks, Miriam Microsoft CRM 1.2 is only licensed to access crm data. I assume you are using an odbc data source to bring in data from other systems? "Miriam C." <MiriamC@discussions.microsoft.com> wrote in message news:BC6C6276-AE81-4...

Dynamic GP 9.0 and SQL 2005 SP3
Hello i have my server with Dynamic GP 9.0 SP2 with Sql 2005 Sp2 and work fine. but i Need upgrate to sql 2005 SP3. after intall did work my dynamic Gp 9.0? Thanks Assuming what you are saying is that your GP 9 does not work after applying SQL Server Service Pack 3, then you should check that your ODBC connections have not changed. Best regards, -- MG.- Mariano Gomez, MIS, MCP, PMP Maximum Global Business, LLC http://www.maximumglobalbusiness.com The Dynamics GP Blogster at http://dynamicsgpblogster.blogspot.com "elvis" wrote: > Hello > i ...