Read XML into Dataset and load SQL server table from Dataset

Hello all,
I am working on a project with the following characteristics:

1. Load data from a SQL server table to an xml file

2. Read the xml file into a dataset.

3. Load data from the dataset into another SQL server table.

I was able to accomplish the first objective.
I used the following code to read the generated xml file into a dataset.
Dim strXml As String = "C:\Customers.xml"

Dim sr As StreamReader = New StreamReader(strXml)

Dim ds As DataSet = New DataSet

ds.ReadXml(sr, XmlReadMode.IgnoreSchema)

How can I traverse in the dataset and post each row to my desired table on a
different SQL server?

Any help will be greatly appreciated.


sal1524 (2)
1/21/2004 7:57:50 PM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 11

Never mind I figured it out.
"Sal" <> wrote in message
> Hello all,
> I am working on a project with the following characteristics:
> 1. Load data from a SQL server table to an xml file
> 2. Read the xml file into a dataset.
> 3. Load data from the dataset into another SQL server table.
> I was able to accomplish the first objective.
> I used the following code to read the generated xml file into a dataset.
> Dim strXml As String = "C:\Customers.xml"
> Dim sr As StreamReader = New StreamReader(strXml)
> Dim ds As DataSet = New DataSet
> ds.ReadXml(sr, XmlReadMode.IgnoreSchema)
> How can I traverse in the dataset and post each row to my desired table on
> different SQL server?
> Any help will be greatly appreciated.
> Sal

sal1524 (2)
1/21/2004 8:56:12 PM

Similar Artilces:

MSCRM 3.0 (How does the user access Microsoft CRM from server)
Hi, I have installed Microsoft CRM 3.0 on Windows Small Biz Server. I am able see Sales, Marketing, Services running on the server. I want to let the respective user to see the UI, how do let them access from their computer. Thanks patric They would enter the URL for the server (http://servername). They may also need the port (by default http://servername:5555). -- Matt Parks MVP - Microsoft CRM "pat" <> wrote in message Hi, I have installed Microsoft CRM 3.0 on Windows Small...

I want year in one table to be less or equal year in another table
Hi I have some problems writing a query and I hope someone can help me. I have a database with serveal tables. In one table I have this information, Lake ID-number, treatment, year for treatment. In another table I have Lake ID-number, fish species (I am intrested in pike), year when pike is present. I want to find all lakes that have pike present before the treatment was done, I want the year in the second table to me less or equal the year in the first table. Is there a easy way to do this? Thanks Try something like this substituting your table and field names. S...

how do I change the table from which a form obtains data
I have a form that I have set up, but I would like to re-create it several times and change the table that each copy gets data from. EG Table 1 feeds Form A. I want to copy this form to create form B but it currently gets data from table 1, so I need to change it so that it now gets data from table 2. That's probably clear as mud but hopefully someone can help me! thanks Jo, If all the tables have exactly the same fields, you just need to change the Form's RecordSource. Copy the form to another name, and change the RecordSource table, or more usually, a query against the...

Microsoft CRM server is not responding
Hi, Workflow Manager write: The specified Microsoft CRM server is not responding. This might happen if it is currently unavailable, it is not a Microsoft CRM server, or you are not a valid user. Fro more information, contact your system administrator. How fix it? In IE i can logon to CRM. ----- wbr, Eugene I've resolved this problem by restoring the metabase with the original version in IIS Regards Edgard Eugene wrote: > Hi, > > > Workflow Manager write: > > The specified Microsoft CRM server is not responding. This might happen if > it is currently un...

Pass Through to SQL Server Optimization Questions
On an autoexec function several recordsets are opened. Some are queries to local tables, some are to sql server tables. I have been trying to optimize performance but I haven't seen much difference in speed between queries run directly against linked SQL Server tables vs pass through queries. Here is my code for creating the pass throughs (I have another function OpenRecordSetLocal that handles queries to tables within the frontend. The ODBC connection string resides in the query Q_PassThrough. Am I missing something key? Is there a better way to do this? Thanks. Function OpenRecord...

converting tabular structures in a Word document into an actual table or reading data from the tabular structures using VBA code
I have a macro which can read the last cell/column of all tables in a Word 2003/2007 document and store the data in an MS-Access table. But, some Word documents have the data in structures like a table format but are not actually tables. The structure looks like a table, but the table borders are actually line connectors. These documents were created by a software(VeryPDF PDF to Word converter) which converted the PDF documents(the original format these documents were) into Word documents. 1. Is there a way I can convert/replace the tabular structures with actual tables in Word so t...

How do I preserve the accents when saving as XML Spreadsheet?
Excel displays these two French words "Comptabilité Générale" but when I save it as an XML Spreadsheet I get "Comptabilité Générale". Why? How can I preserve the initial formatting? Thank you. ...

How to transform HTTP query string (HTML data) to xml?
Dear experts, I need to send a simple HTML form to an ASP.NET page which has to create a xml object. What technique would you recommend me to use in order to transform a HTML form data to xml? What naming convention for the input fields would be best so that I can easily parse the query string in the asp page and create the xml object? I also dispose of the .xsd schema of the xml that must be created if that could be of some use. At every request the .xsd could change so I need some general algorithm. I would greatly appreciate your help. ...

How do I convert a word table into an excel document?
I have managed to get the info accross no problem but the formatting is all over the place. For instance - 07/10 meaning July 2010 is appearing as 07/Oct despite me going into format cells custom then enter mm/yy which has always worked previously. Any ideas? You can't use it like that regardless of formatting, you need to put in the whole date or else Excel will always assume the current year so any real date used for calculations needs to be numeric and needs a day, so you can enter (assuming US date format) 07/01/10 and use a custom format of mm/yy or if you don't need it for...

Insert,Update Data in sage (MS Access Linked tables) using form
Hi folks, I am developing application using which requires integration with SAGE LINE 50 (Accounting software ) V11... The data which SAGE is using is MC ACCESS 2003 database... with linked tables in it... Now I Have developed the Sage connection using ODBC which works fine when reading the record but cannot Add or Update record into the Linked tables.... When i debug the program the error is at the line where it has... <br> MyodbcCommand.ExecutenonQuery() <br> Can anybody Help ????? -- Message posted via

Dropped connection to POP3 servers
Just installed Office 2003 under XP Home. Outlook is dropping connection to POP3 servers, I check 2 different servers with a S/R. Both fail at the same time, never separately. Sometimes I can exit Outlook gracefully but a reboot is required to get Outlook to work again. Sometimes locks entire system and have to powerdown manually. Pattern not fully determined but it appears to happen when there is other activity to the internet that is going to specific servers using an ID and password. I use Medved Quotetracker with E*Trade quotes (requires ID). If I bring up Quotetracker, Ou...

how to config Server for one user which has 2 mail address.
we have one NT4.0 + Exchange 5.5 Server "A" Email ��and another windows2003 + exchange 2003 Server "B" user name is same in A B��Mx record was be set ,question is how to config Exchange 2003 to receive down the mail to Server A , because of we need to replace A with B. thanks a lot. E2K3 setup guides you through common scenarios (like yours) pretty much holding your hand - on welcome screen tell it that you have existing E55 org and want to join it, then follow on-screen instructions. Having usable backup of Exchange databases and AD i...

help with dynamic tables
This is a bit complicated to explain but I'll try my best. In columns A, B, C I have different drop down lists. Column A has Store1, Store2, Store3, etc. Column B has Dept1, Dept2, Dep3, etc. Column C has ProductA, ProductB, ProductC. As of right now, these lists are not dependent on each other, I can choose anything from any list regardless of the previous category. Also, the length of these lists is undefined, meaning I will constantly be adding to them in sequential rows below. And then columns D and beyond have data such as Sales, Profits, # of items, etc. What I...

How Can I Control When Messages are Downloaded from Server
I have the box "Check for messages every ___ minutes" unchecked (tools/options/general). Yet seemingly randomly, messages get downloaded a couple of times a day without my clicking "Sync." This is problematic due to the way I share the computer. Is there another setting I need to keep this spontaneous downloading from occurring? "Gripper" <> wrote in message > I have the box "Check for messages every ___ minutes" unchecked > (too...

Publishing Layout and tables
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) I am trying to copy and paste text from one cell of a table to another cell in the same table. The document is in Publishing Layout. The paste command deletes the text in the destination cell and then places a big empty text box on top of the table. I do dozens of these documents that are primarily tables and graphics. Previously I used Publisher on my old PC. Should I go back, or can this be done in Word for the mac? Hello, On 2010.01.29 8:44 AM, in article 59bb1ce2.-1@webcrossing.JaKIaxP2ac0, "Toni_T@officefor...

Exchange Server 2000 Secuirty Setup problems
Dear I have apply wrong setting to our exchange server 2000 . The wrong setting as from exchange manager . mail store , I have apply everyone send as and receive as access right, the group included remote access via offline sync. This setting once apply , all user access other mailbox without apply access right. I have try disable this setting, after all local office user no problems, but a remote offline sync laptop user does not work . The error as below: Unable to display the folder. Microsoft Outlook could not access the specified folder location. The file C:\exchange\shawnb.ost cannot b...

Need code snippet to read offline PST file
Hi friends, I have a PST file in my local hard disk and have requirement to read PST file and parse through all folders and then each message item in all folders and then segregate them to different folders based on subject line. Please kindly send the code for the above requirement. Thanks & Regards Ramesh -- ramserp You're going to have to write your own code. Do you know anything about Outlook programming at all? You can start out by looking at information and code samples at -- Ken Slovak [MVP - Outlook] http://www.slo...

Querying multiple records in two tables
Hi, in my database I have tables for users (UserID, UserName), projects (ProjectID, Project Name), and qualifications (QualID, QualName). I have join tables for users_qualifications (UserID, QualID), and projects_qualifications. (ProjectID, QualID). What I need to do is run a query for a project to show which users have the exact matching qualificiations. Users can have many qualifications, projects can require many qualifications, users may only work on a project if the qualifications required/held match exactly. Please help. Assuming that ProjID, and QualID are numeric, the following sho...

Sql Agent Error
After installing CRM we are receiving the following error. "An error occurred when attempting to set the SQLSERVERAGENT service to AutoStart: System.ComponentModel.Win32Exception: The specified service does not exist as an installed service at Microsoft.Crm.Setup.Common.Utility.ServiceUtility.SetServiceToAutoStart(String serviceName, String machineName) at Microsoft.Crm.Setup.Server.ServiceRunningValidator.AutoStartLocalService(String serviceName, TimeSpan waitTimeForStart) We have CRM on a SBS 2003 machine and SQL EE 2000 on a W2K3 machine. Both are DCs the SBS holds all FS...

DPM and VMM on same server using side-by-side SQL installation
Windows 2008 Std R2 Server, 64bit VMM 2007 is currently installed (with the built-in default database) SQL 2005 Express Edition, SP3, 32bit. I was advised by Microsoft that both VMM and DPM could be installed on the same server (small DR environment) The VMs are hosted on a Windows 2008 Enterprise Server w/ VS2005R2 - because the hardware didn't support HyperV. VMM works great to manage the Windows 2008 VS2005R2 Host running Win2K3 server instances ... after lots of trial and error. Now, I need to install DPM 2007 onto the same server... DPM wants to install the 64bit vers...

reading and displaying memo fields
I got an ODBC database with a memo field. Now I use a CRecordSet in VC6 to read the database with CLongBinary for the memo field. After reading 18 fields he's out of memory. Is there a way to use CString instead of CLongBinary, cause it's only text in the memo fields (I already tried, but then I get an error message that the database could not be read)? Or is there a way to read all other fields first and only read the memo field when the user choose a specific item in the database? Thank you for helping me! ...

Exclude Certain Recipients from Read Receipt
Windows XP Office XP I have a read receipt requested automatically to every email message I send on my business email. I have several contacts from whom I do not want to request a read receipt. Is there a VBA code or something that will request a read receipt to every email message except those addresses which I specify. You can use rules to request receipts and exceptions to the rule for those that don't need them. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Author, Google and Other S...

Excel pivot table #2
i encountered an error in my pivot table. i created an olap cube using the analysis manager. the cube displays the correct data of my measures but on my pivot report, it displays #N/A.... i need help to fix this one... thanks.... =) ...

Outlook 2000 client Connection TimeOut w/ Ex5.5 server???
Hi, we have a really intriguing issue that started recently. Outlook users, when clicking on an item in the Mailbox, will get the message "Can't open this item. The operation could not be completed because of an error on the network. Try to log on to the network again, and then repeat the operation." The user will click OK, and usually will be able to open the same item in one or two attempts. The Envrionment: Ex5.5 SP4, Outlook 2000. It is ONLY the Windows98 users that is seeing this message, on NT and W2k stations, there's this occassional hour-glass when we click on an ...

Exchange Server C Drive No free space
Hi All, Need some advise. The Exchange Server during certain times C Drive will not have free space. I have check that during that period there is a temp file which will increase in size and takes up all the disk space in C. The file will not have any extension (the file name ex. T232C or R408). When this happened, the Exchange MTA service will stop, users will not able to send email. I have rum Spyware scan, Virus Scan, Online Virus scan, all seems to be cleaned). Anyone experience this before? Thanks in Advance for the help. -- Danny Chieng Technical Engineer On Wed, 26 Jul 2006...