ASP.NET 2.0: problem using xmlDataSource and GridView...

I am having trouble using XML in an ASP.NET 2.0 webform.  Using ASP.NET 2.0 
beta 2, I have created a blank web page in a C# website.  I have added an 
XML file (soData.xml), structured as follows:

<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
  <descrip>10.0 GB EIDE Ultra DMA 9.0ms Hard Disk Drive</descrip>

When I drag an xmlDataSource from the toolbox to the page in Design mode, I 
get the following error dialog box:

   The operation could not be completed.  Unspecified error.

However, if I drag the xmlDataSource from the toolbar onto the page in 
Source mode, there is no error.  I am able to go into xmlDataSource Tasks 
and configure the data file to ~/soData.xml.

Then when I drag a GridView from the toolbox to the page (in either Design 
or Source mode), no error is generated. But when I use the GridView Tasks to 
set the data source to xmlDataSource1, the GridView box on the page says:

There was an error rendering the control.  The data source for the GridView 
with id 'GridView1' did not have any properties or attributes from which to 
generate columns.  Ensure that your data source has content.

I have generated a schema for the XML file, but that doesn't seem to help. 
Here is the layout of the .XSD file:

<?xml version="1.0" encoding="Windows-1252"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" 
 <xs:element name="VFPData">
    <xs:element maxOccurs="unbounded" name="ac_sodata">
       <xs:element name="iono" type="xs:string" />
       <xs:element name="sodate" type="xs:date" />
       <xs:element name="sono" type="xs:unsignedByte" />
       <xs:element name="custno" type="xs:string" />
       <xs:element name="item" type="xs:string" />
       <xs:element name="descrip" type="xs:string" />
       <xs:element name="qtyord" type="xs:decimal" />
       <xs:element name="qtyshp" type="xs:decimal" />
       <xs:element name="rqdate" type="xs:date" />

Any help would be greatly appreciated!

Will Kacy 

willkacy (1)
10/2/2005 3:06:17 AM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 3

I've experienced the same problem and do not know the answer. However
I've found a couple of workarounds.

Your XML-file contains textnodes and if you change your XML file forma
and use attributes instead, it works.


<user name="Peter" address="City"></user>

instead of


If you don't want to change the XML-file you can make it work if yo
write code instead of using the XmlDataSource control:

System.String xmlFile = get_Server().MapPath("XMLfile.xml");
System.Data.DataSet ds_myusers = ne

It doesn't answer your question though. I believe it's a bug.


SteenNielsen's Profile:
View this thread:

10/13/2005 8:17:50 PM

Similar Artilces:

rms 1.2 vs 2.0 #2
i'm considering upgrading from RMS v 1.2 to v 2.0 running 5 store locations with HQ. i have a trial version of Store Ops 2.0 that i've been testing to see what differences there are and really can not see where much has changed. i do not know what changed in HQ since i do not have that trial. can anyone fill me in on what improvements were made between the 2 versions? obviously i can not obtain support for v 1.2 any long which is a concern but aside from that is there value in upgrading, especially in these challenging financial times? thanks, jim Brad, You're right ...

ASP to ASP.NET --- XMLHTTP error--XML document must have a top level element
Hi i am converting an ASP page to ASP.NET. The original ASP code works perfectly but in ASP.NET i am getting the error "XML document must have a top level element." I have checked the XML being sent and it looks exactly the same as the live (working version). The back end code has not changed at all. The client side code is as follows: Dim xmlhttp, WISERServer WISERServer = "JK-VM1/production/Pages/XML.asp" xmlhttp = CreateObject("MSXML2.XmlHttp.4.0")"GET", WISERServer, False) xmlhttp.setReques...

Changing computer with RMS2.0
Hi all This topic was asked before by someone who uses a dongle for RMS 1.3 but i am asking it since I am using RMS 2.0 Can I change my PC that contains the "activated" RMS 2.0 Is there a way to "Deactivate" my RMS the POS component on current PC and install it again on another laptop and "activate it again" ? It may sounds like software piracy but I wonder what will happen if to the software if our RMS machine really malfunction e.g. damaged harddisk, stolen, etc ? pls help. Regards, Joie In point of fact this has happened to us on a regular basis....

Another 2005 problem
When setting up my budget, on the income screen I show one dolla amount, then on the expense screen, it shows the same dollar amount an shows I have $150 some dollars not bugeted, then when I go to the fina screen it says a differenct income amount that is about $450 lower tha what it says on the income set-up page and that of course puts m expenses higher than my income. -- adam7 ----------------------------------------------------------------------- adam75's Profile: View this thread: ...

.NET Framework 1.1 Service Pack 1 Security Update
Hi I am unable to install the .NET Framework 1.1 Service Pack 1 Security Update - error code 0x643 (tried dozens of times). I have found a resolution on the MS site but it does not show me where to find .NET Framework version 2.0 SP2, version 3.0 SP2 or version 3.5 SP1 which I will need to reinstall after deleting the originals and running the cleanup utility. Any ideas? Search this newsgroup for "643." -- "Don't pick a fight with an old man. If he is too old to fight, he'll just kill you." "Mac 33" <Mac33@discussions.mic...

transferring money 97 to money 00 version 8.0
I need to know if it is possible to transfer data for my older computer and into a newer computer that currently has money 2000 version 8.0. If this is possible please advise me on how to do this.Also, I have opened up a new account and need this data into that acccount. Thank you Sandra You say "I have opened up a new account and need this data into that account." I ***think*** what you means is that you have created a new Money data file for your accounts and need to merge this with your old Money data file and its accounts. If I have interpreted your second question correc...

Combo boxes #2
Ok, here's the problem... On my spreadsheet is a pair of combo boxes which when one is changed the other will change to correspond with the others data (e.g. the location name corresponds to the cost per day). My problem is that i cannot seem to work out the total cost of the location. I know that i should multiply the cost per day by the number of days, but seeing as the cost per day is in a combo box i can't do it. Any suggestions? (also im not sure if the way i entered the data in the combo boxes is correct, so any help would be appreciated). Cheers, Andy You can link a ...

exception when I call ActiveDocument.Range(0,0).Editors.Add(-1)
When I browse to an email, the plug in will search the email text. If find URL inside the email I will insert some string into the email based on if the URL is safe or not. It works fine on Outlook 2007. However in Outlook 2010 beta when I call: ActiveDocument.Range(0,0).Editors.Add(-1) // where -1 stands for everyone It raise exception. BTW, I've tried different integers as parameter to Editers.Add() method. And I also use email address, email alias string as parameters. All raise exceptions. Any suggestion? Thanks in advance. Tom And what does the message ...

error (0x8004010F) #2
We have exchange 2003 and office/outlook 2003. We just removed 1 exchange 2003 server and now I am getting the following when outlook tries to send/recieve: Task 'Microsoft Exchange Server' reported error (0x8004010F) : 'The operation failed. An object could not be found.' Then in my "Synch Issues" folder I get this: 14:48:28 Synchronizer Version 11.0.6352 14:48:28 Synchronizing Mailbox 'David Chase' 14:48:28 Synchronizing Hierarchy 14:48:28 Done 14:48:28 Microsoft Exchange offline address book 14:48:28 0X8004010F Any ideas? Thanks. David On ...

Import #2
what's the easiest way to import a .pst file? Import it into what -- another Outlook installation? The easiest way is not to import at all. Simply open the .PST file in Outlook -- use File | Open. Make sure your Folder List is visible so you'll be able to see the folder tree structure when you open the file. -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply only to the newsgroup to preserve the message thread. *** In news:12bd401c3f697$e09b13e0$a401280a@phx.gbl, Brent wrote: > what's the easiest way to import a...

problem with saving #3
Hello Dave, Thanks for your quick reply and feedback. I tried it and indeed I don' get the messagebox "Excel recalculates formulas ....". As noted in th Google Groups- thread I still get the normal messagebox "save changes which I still manually have to confirm in order to get the correct dat read back to my application. So I am now looking if I can set some parameter in the registry tha does this automatically. thanks again Stefaa -- popering ----------------------------------------------------------------------- poperinge's Profile:

How to revoke rights to customers using scribe
Hello, Can somebody give me an idea on how to remove rights/sharing capability to customers using Scribe? ...

i have now managed to get my countif statement to work thats to this forum, =COUNTIF(Sales!$F$6:$F$3041,C5) my next step is to get this to work in tangent with another countif. i need the above countiff to only work if the cell value in =Sales!H9 is displaying the words "Quarter 1" how would i adapt my count if to include this ------------------------------------------------ ~~ Message posted from ~~View and post usenet messages directly from =IF(Sales!H9="Quarter",COUNTIF(Sales!$F$6:$F$3041,C5),"") ...

Sending mail from an ASP webpage
Hi all, We have just converted to Windows SBS2003 with Exchange 2003. Our intranet and a few other internal webbased systems used to rely on CDO Mail to send emails via these webpages (be they webmail type pages or alerts etc). We were running a Win2K server before hand and were able to use the Default SMTP Virtual Server to send our mail with. Now that we have upgraded, it has changed somewhat and it appears to no longer operate in the same fashion. IIS is considerably different (which i'm slowly getting the hang of) and we now use exchange as our mail server. How do we set this new m...

How much RAM #2
Hi, I am currently putting together a server spec for Exchange 2003 and my client wants Exchange 2003 Standard. Is there any point putting 8Gb RAM in the box? For example Windows 2003 Std only supports 4Gb, how much will Exchange use? If I recommed Windows 2003 Ent will Exchange use the 8Gb?? Please help!?? For 32bit Exchange, 4Gb is the limit. There is no point in adding more as it will not be used and could cause harm (force the PAE kernal to load causing PTEs to consume twice as much RAM effectively cutting the available PTEs in half. This reduces the number of concurrent u...

Using SUMIF i want to say IF A=1 & B=2 then sum C any help pleas
I want to single out a sum that has two common detonators row A and B, IF row A=1 and row B=2 then sum row C Try this, adjust the range to match your data: =SUMPRODUCT(--(A1:A100=1), --(B1:B100=2), C1:C100) Does that help? -- "Actually, I *am* a rocket scientist." -- JB ( Your feedback is appreciated, click YES if this post helped you. "Peter" wrote: > I want to single out a sum that has two common detonators row A and B, IF row > A=1 and row B=2 then sum row C That's quite an explosive worksheet you have<... Datagridview RowValidating
Greetings, The code below never sets the current cell to the error location, allowing user to correct the mistake (see below), though does display the error message. This is activated when they press tab to leave the row (RowValidating) and the next row is populated with values from DefaultValuesNeeded I was wondering where my logic and code have failed me, instead of setting the focus to the cell containing the error it moves to the next row with the default values set but the error logo and text displayed? Thanks Rob 'Validation for day of weekends Select Case Dir...

dcount problem
Ok, i am at a loss. i am doing a dcount that was working and now it isn't. the only thing i can think of is that now not all of the criteria are available. =DCount("[Score]","[Scores]","[Player1]=[Name]") not all of the "Player1" field are in the report using "Name" should that be happening? On Apr 8, 3:02=A0pm, pat67 <> wrote: > Ok, i am at a loss. i am doing a dcount that was working and now it > isn't. the only thing i can think of is that now not all of the > criteria are available. ...

SQL connection management in ASP.Net
hi, I have to create a small website in ASP.Net 2.0. I have question about working with SQL connections. What are the best practises? How and where to create and store a connection? I see a few possibilities: - create, open/close a connection on each web page - create a connection on login page and store it on Session - how to create a connection? ie. SqlConnection = new SqlConnection or System.Data.Common.DbProviderFactory factory = System.Data.Common.DbProviderFactories.GetFactory("System.Data.SqlClient"); System.Data.Common.DbConnection conn = factory.Crea...

Inserting Clipart #2
We are running Server 2003, XP at the desktops, and Publisher 2003. We installed Publisher on the server and 'pushed' it to the workstations. When we try to search clipart on the computer it hangs up or locks up the workstations. Should we have done a local install? When we search online there is never a problem. Also we are not having this problem with Office 2003. Dawn wrote: > We are running Server 2003, XP at the desktops, and Publisher 2003. > We installed Publisher on the server and 'pushed' it to the > workstations. When we try to search clipart on the co...

MBX #2
Is it possible to move the MBX directory in an Exchange 2000 server? Rick ...

how to encapsulate a variant using CComSafeArray ...
Hi, I post a piece code (that needs verification about its correctness) shown below but got no reply. Could someone point me some examples using CComSafeArray from the client site? Microsoft has two examples that don't help me a lot. I also tried google the topic but still got some examples that just don't show how to use it from the perspective of the client site. Any instruction is much appreciated. CComSafeArray<VARIANT> edges; CComVariant v = face.GetEdges(); // return a variant of a safearray of IDispatch* edges.Attach(v.parray); v.parray = 0; // to avoid v'...

Using Outlook on a MAC
Does anyone know why I can't forward HTML email with Outlook on my MAC? It is received ok but when I forward it, it goes out as text and all the formatting and images are gone. I'd appreciate the help. ...

Problem with Deleted Item Recovery in Outlook 2003 Cached mode
Hello I am running Outlook 2003 against a server running Exchange 2000. Outlook is running in cached mode. I am having a problem with the 'Recover Deleted Items' tool in Outlook. I can initially see the list of items to recover, once they are selected and I choose to recover them they disappear from the list, however they do not appear to sync back into the deleted items folder in Outlook. When I turn off cached mode the messages appear. This is happening on every Outlook client in the building; it is reproducible and happens with 100% consistency. Can anyone offer some advi...

Exchange 2003 Distribution List #2
I have migrated to exchange 2003 from exchange 5.5. I have distribution list set up in 5.5 and would like them to be placed in 2003. The query-based distribution list in 2003 updates the list with all contacts. I would like to know if there is another way to set these up to were the user can see the list like they did in 5.5 without the list updateing itself with contacts that dont belong. Is there a way to do this in 2003? Thanks for your help. (matt) wrote: >I have migrated to exchange 2003 from exchange 5.5. I have >distribution list set up in 5.5 and wou...