SEARCH YOUR SOLUTION HERE  

Creating a dataTable from XmlTextReader

Hi all,

I'm trying to create 3 DataTables and add them to a DataSet to then do querying between them. My source of data is from XmlTextReader.

I'm able to create a DataSet no problem from the XmlTextReader via:

ds.ReadXml(xr);

but I'm not sure how to create a DataTable. Can someone shed some light on this

Posted On: Wednesday 2nd of January 2013 12:45:57 AM Total Views:  156
View Complete with Replies




Related Messages:

project title   (168 Views)
i would like to know some project titles in asp.net
SMTP / Local Host { RESOLVED }   (187 Views)
I am having trouble sending mail from my server. Can I use my own mail box for the relay on the server. The server is outside the ISP's network though.example: mail.optonline.net (optonline.net being my ISP).The function works perfectly on my desktop, once deployed to the server however, It takes a moment to complete. It then redirects to another page but no email.Any ideas
ASP. NET Problem   (162 Views)
the web page which i want to develop is only allow one visitor to view the page. it mean if there are one visitor viewing the page, then the ither visitors cant view it.is this possible do it in asp .net if can, how to do i
ASP.NET with MS Access VS SQL 2000; advantages/disadvantages?   (167 Views)
I'm going to start my first ASP.NET project. In the process of looking for a web host I noticed that one account for $29 monthly offered a MS Access database and the next package higher at $59 monthly offers a MS SQL 2000 database. I was wondering if one database is better than the other , If one is easier to use than the other, and what the limitations of Access are compared to SQL. I will be working on a project for a car dealership to display all their cars in stock along with the vehicle options etc. They probably only have around 300 vehicles in stock at a time but have many fields for each record that include price, options,etc.I'm not sure which database type would work the best, I'd like to pay for only what it would take to do the job properly. I'm also not sure if learning/working with SQL is any harder or easier than Access and since I have to learn how to use one or the other, I guess it doesn't matter to me which one it is as long as it can do what it will need to do to make the website work well. If anyone has a minute of spare time could you please let me know your opinion.Thank you for any information you can provide.:D
Post Back on New Session   (156 Views)
My Page_Load() code sets up my page if Session.IsNewSession is true. When I click a button after the session has expired Page_Load detects Session.IsNewSession is true and runs the code, but my button's onclick code still runs and causes a null exception trying to access a session variable. How can I stop the onclick functions when the session expires Is there a better way to handle a session expiring
AJAX Autocomplete Extender   (260 Views)
Moved to ASP.NET forum. You will get a better response in this forum.
JavaScript & CustomValidator Control   (164 Views)
On a page I have a Repeater control, in the Repeater control I have an ItemTemplate which is CheckBox. As the Repeater is being bound it generates a CheckBox for each name in the contact list. I am trying to determine if the user selected at least 1 contact, I get the alert but the page posts back anyways. My CustomValidator looks like: My Javascript function (CheckContacts) liiks like: function CheckContacts(source, args) { var ctrl = 'repContacts'; var cbName = 'cbSelect'; var objForm = document.form1; var errorCount = 0; var ctrlName = ctrl + '__ctl1_' + cbName; var chkBox = document.getElementById(ctrlName); if(chkBox == null) { alert ('There was an issue checking the *'+cbName+'* check box in the *'+ctrl+'* control'); return errorCount; } var isChecked = false; var i = 1; // Notice the 1, its important to get the start number correct ctrlName = ctrl + '__ctl' + i + '_'+ cbName; var curItem = document.getElementById(ctrlName); if(null == curItem) { alert ('It was null'); // something is wrong. Probably one of the 'Customize Values' } while (curItem != null) { //to check items inside the DataGrid/Repeater //using the != null check should keep it from getting locked up if (curItem.checked == true) { isChecked = true; } //increment i AND get the next control i += 1 ; ctrlName = ctrl + '__ctl' + i + '_'+ cbName; curItem = document.getElementById(ctrlName); } if (isChecked == false) { source.errormessage = 'Your need to select at least 1 contact in your list'; errorCount+=1; } if (errorCount > 0) { args.IsValid = false; } else { args.IsValid = true; } } Alone I get no alert if no contact is selected. If I add code to the code behind that adds an onclick Event to my button like so: btnWriteMessage.Attributes.Add("onclick", "return CheckContacts()"); I get my alert but the page still submits, which is what Im trying to stop. This is my first attempt (believe it or not) at using a CustomValidator control, so anyone got any ideas
Changing the browser URL   (248 Views)
I am making a simple login system, then if the users details are correct, it will navigate to a different website (example: Google) This is my code so far using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; namespace WebApplication1 { public partial class _Default : System.Web.UI.Page { string password; protected void Page_Load(object sender, EventArgs e) { StreamReader passwordStream = new StreamReader(@"K:\Uni (Year 3)\EJ315020S - Windows Application Devlopment\Projects\AssignmentProgram\LoginSystem\password.txt"); while (passwordStream.Peek() >= 0) { password = passwordStream.ReadLine(); } } protected void Button1_Click(object sender, EventArgs e) { if (TextUsername.Text == "Jbloggs") { if (TextPassword.Text == password) { } } else { } } } } i have searched for it, but all i can find is things about "URL Routing"
Runtime Window Form creation   (197 Views)
Hi Friends, In my application i want to create a window form at runtime and save this newly created form in my current root directory. so that i can access that form in future. So, if any one has any idea how to do this then please help me. Here is the code what i did : Form f = new Form(); f.Name = "Frm_Test"; f.Text = "Test Form"; f.Show(); I can able to create a form dynamically but i did not know how to save this created form.
Using Web Services for Flash AS3 with asp.net   (280 Views)
i am doing a game project on chinese checkers. I am using Flash Cs3 professional to program my project. all in actionscript 3.0. For my database and website, i used asp.net and sql server. I used IIS 5.1 also. I found out that Actionscript 3.0 do not support web services. i want to pass my data from flash to asp.net to store into database. Do anyone have any solutions
pagination in asp.net using c#   (257 Views)
how to pagination in asp.net using c# coding
Session problems   (242 Views)
Problem still exists but found out some new Information. Running IE 7.0.5730.11 from any XP machine, the above session problem holds true. Running it from Vista IE 7.0.6001.18000 it works the way I need it to. I have tried several windows XP machines some with servicepack 3 and others with only service pack 2. It doesnt really matter what updates are on it, the application still ends the session. "Still waiting for the brave willing soul to venture forth and delve into this problem."
Allow users to create files dynamicly   (207 Views)
I'm looking to allow a specific role on the site to create pages (through the ui I create). By default asp.net doesnt grant this permission. How would I allow the role permissions to write files
trying to choose multiple files for uploading   (214 Views)
Hi to alli am trying to do a multiple file upload functionI use a input control : when i run the Web Aplication and click in the associated input button, it opens an "explorer" to choose the file that is going to be uploaded.but i can choose only one.Is there a way that enables me to choose more then one file i saw other solutions but they all implicate a fixed number of
ASP.NET 2.0 Data Cache sort problem   (336 Views)
I query a table that creates a dataset in "lastname" order. I then bind the table to a datagrid that displays the data in the proper "lastname" order. When I move to a "record layout" page I create a datatable from the Cached table and I want to navigate is "lastname" order. Instead, the navigation is in "emp_id" order.GRIDEMP_ID LASTNAME FIRSTNAME5 A JOAN3 B JOHN1 C KEVIN AFTER RESTORING CACHE IN RECORD LAYOUT I GET THIS ORDEREMP_ID LASTNAME FIRSTNAME1 C KEVIN3 B JOHN5 A JOAN Page 1 (contains grid)strSQL = "SELECT emp_id, lastname,firstname"strSQL += " FROM EMPLOYEES ORDER BY lastname"dstSearch = New DataSet()conPubs = New OleDbConnection(connection_string)dadSearch = New OleDbDataAdapter(strSQL, conPubs)dadSearch.Fill(dstSearch, "C_EMPLOYEES")dtblSearch = dstSearch.Tables("C_EMPLOYEES")dgrdEmployees.DataSource = dstSearchdgrdEmployees.DataBind()Cache("CACHED_TABLE") = dtblSearchStep 2. On the grid I have a "Select" link that shows a page with detail about the employee. On the forms are and buttons. When I press the next and prev buttons, the cached data moves in "emp_id" order rather than last name.Page 2 Record LayoutSub Record_View()Dim dtblTemp AS DataTableDim dvwRecord AS DataViewDim RowIndex AS IntegerDim numrows AS INTEGER SESSION("PREV") = 0SESSION("NEXT") = 0SESSION("FIRST") = 0SESSION("LAST") = 0dtblTemp = Cache("CACHED_TABLE")numrows = dtblTemp.Rows.Count-1SESSION("FIRST") = dtblTemp.Rows(0).Item("EMP_ID")SESSION("LAST") = dtblTemp.Rows(numrows).Item("EMP_ID"))dvwRecord = dtblTemp.DefaultView()dvwRecord.Sort = Session("LASTNAME") RowIndex = dvwRecord.Find("EMP_ID")) IF RowIndex -1 THEN IF RowIndex > 0 THEN SESSION("PREV") = dvwRecord(RowIndex-1).Row(EMP_ID")) END IF IF RowIndex dtblTemp.Rows.Count-1 THEN SESSION("NEXT") = dvwRecord(RowIndex+1).Row("EMP_ID")) END IFEND SUB
Tooltip for a database driven listbox   (232 Views)
Is there a way to make a tooltip for a database driven listbox without using client side codeWhen not does anybody know a way to develop thisThx
write a program to ping a series of IP addresses   (310 Views)
Steve, you can use the xp_Cmdshell extended Stored procedure if you are using SQL Server.CODExp_cmdshell 'PING 127.0.0.1'Try that in Query Analyzer with some different IP addresses and you should get back several rows depending on the results. From those results you should be able to get all the info you need.You could probably write your own sproc to do this and ping a list of preconfigured ips.
Can web form perform drag and drop?   (213 Views)
Can web form perform drag and drop
make label text invisible after 3 minute?   (256 Views)
I use label as message bar. Is it possible to make label text invisible after 3 minute
Javascript functions stop working   (294 Views)
Hi ,I need desperate help!!! I have an ASP.NET application that depends heavily on scripting. I was getting ready to put the website online (in a couple of days) when suddenly all the javascript that I have on the site stopped working. I'm running Windows 2000 Server, and the last thing I did was I went to Windows Update and downloaded over 25 updates for my machine, 18 of them critical. Other than that, I have done absolutely nothing so I'm suspecting that one of the updates messed me up. Does anybody know what may be happenin
Problem with RichTextBox component   (183 Views)
hello,I have a web application in which I want to use the functionalities of the RichTextBox component.I added it to my reference and import the system.windows.form.I use it like thismyRichTextBox as new RichTextBox()myRichTextBox.Rtf = "my RTF string"but I have the followinfg errorSystem.ComponentModel.Win32Exception: The class already existI don't know what's going on.Any Ideas
class for server variables   (221 Views)
I'm looking to use request in some vb.net modules in my asp app. Which class is needed in order get access to the server variablesTIA
Newbie Questions   (217 Views)
I've never used .net but I've got .net source code that i want to use. I'm currently running IIS 5.0. Is is as simple as using those files or do I need to install a program that will allow me to use .net programming
Unable to print report from the server   (223 Views)
I have an app built in asp 2.0. It allows data entery and when the data is saved to a database, it prints a crystal report. This all works fine when I run it local on my machine. But when I publish it to the server, it bombs. Here is my code and the error message.CODE'**************** this is the code that actually prints the report Dim myReportDocument As New ReportDocument myReportDocument.Load(Server.MapPath(strReport)) myReportDocument.RecordSelectionFormula = "{command.RECORDID} = " & Session("ReportID") myReportDocument.PrintToPrinter(1, True, 1, 99)Error Message:Error in File C:\WINDOWS\TEMP\CaseLogDoc {39507207-A58B-48F3-ABEA-8FE633E626D3}.rpt:Unable to connect: incorrect log on parameters. ProDev, MS Access ApplicationsVisit me at ==> http://www.prodev.usMay God bless you beyond your imagination!!!
Best Practice for DetailsView   (222 Views)
Using .NET 2.0 and VS2005 I'm creating a new website and I'm trying to utilise the new controls and features were possible.At the moment I'm making a simple update / add record form and initially tried creating the textboxes and using a ObjectDataSource Control set to a TableAdapter to add the fields. This worked but I can't for the life of me work out how to read a record from the ObjectDataSource and populate the textboxes ready for an edit to occur. I'd still be interested in hearing how to do thisAnyway, so I decided to try the detailsview control. At first I couldn't work out how to validate it and add multiline textboxes, but some time playing with templates has got most of that ironed out. However I'm trying to work out the best practice for updating some default fields in the table that the user should not see in the details view. I have a field for modified date to enable basic auditing of the updates and want to update it with the current date and time when the user clicks the update command in the detailsview. How can I do this / what method is best advice greatly appreciated.Cheers, Steve G (MCP)
Crystal Report to PDF Problem in ASP.Net   (181 Views)
Hi ,I have a problem. I need to generate a PDF from a crystal report on a web form. Thats no problem, that works, but for some reason, my page behind the PDF disapears. What i mean is the page that made the request (even though it has the same URL) is blank and the PDF opens up in acrobat over the web page.my code CODE Private Sub cmdGenerate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdGenerate.Click ExportReport() End Sub Sub ExportReport() Dim oStream As New MemoryStream ' // using System.IO ' Select Case format ' Case "PDF" oStream = cr.ExportToStream( _ CrystalDecisions.Shared.ExportFormatType.PortableDocFormat) Response.Clear() Response.Buffer = True Response.ContentType = "application/pdf" '-------------------------------------------------------------- Try Response.BinaryWrite(oStream.ToArray()) Response.End() Catch err As Exception Response.Write("< BR >") Response.Write(err.Message.ToString) End Try End Su
ListBox Javascript   (157 Views)
Does anyone have Javascript for limiting the number of selected items (lets say to 5) in a multi-select ListBox using ASP.NET
Lost SQLDataAdapter on page design   (558 Views)
Hi ALL,For some reason, I've lost my SQLDataAdapter, SQLConnection, and Dataset icons that appear at the bottom of the design page. Of course, I need these to make property changes. Anyway, I closed VS and reopened it, but it didn't make any difference. The version I am using is: Microsoft Visual Basic .NET 69461-270-0000007-18910Has anyone seen this before Any thoughts, ideasTIA, Randy
Creating Dataset via Data Adapater OR DataTable Programmatically   (201 Views)
Your help is appreicated, I am reading .Net and got confused. Data Adapter (DA)can create DataSet with one or more Datatable (DT)by using the DA method ( Fill). However, DS and DT can also be created programmatically.I find it easier to use DA.Fill. So my question, why would a developer create Ds and DT programmatically and what added advantages would he/she gain
FolderBrowserDialog   (173 Views)
I am trying to use the FolderBrowserDialog option to allow users to browse for a folder. I can't seem to get it to import System.Windows.Forms which I assume I need - it says: Namespace or type...cannot be found.I am using VB.NET and .NET v1.
Problem configuring a ODBC datasource   (284 Views)
Hi. I'm using VS2008. My problem is that I need to configure my ODBC data source with a custom stored procedure, but when I get to the "define custom statements or stored procedures" page in the configure wizard, stored procedures bullet is greyed out. I need to use this data source to populate a gridview