DataSet/XmlSchema/DataGrid Framework 1.1 - 2.0 Problem

Hi,

I have a problem with reading an XmlSchema with Frameowk 2.0 and an
own DataType. I found no example
(searching two days).

What I do is:

DataSet dataSet = new DataSet();
dataSet.ReadXml("{path}/MySchemaAndData.xml");

dataView = dataSet.Tables[0];
dataGridView.DataSource = dataView;

Easy with Framework 1.1 (VisualStudio 2003). Everything is working
fine. Now with rameowrk 2.0 I get one
error after another, maybe someone can help me solve the problem,
knows a link or what ever. I'm really
despairing.

If need, i can write more information, what i tried unsuccesfully for
the last 20h.

The Schema looks like following:

<?xml version="1.0" encoding="ISO-8859-1"?>
<Data version="V1.0.0.0">
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="daten"
xmlns="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="data" msdata:IsDataSet="true" msdata:Locale="de-
DE">
      <xs:complexType>
        <xs:choice maxOccurs="unbounded">
          <xs:element name="aTableName" msdata:Expression="Column">
            <xs:complexType>
              <xs:attribute name="Column" type="xs:string"
type="xs:string" msdata:DataType="MyNamespace.MyClass, MyAssemlyName,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>/>
            </xs:complexType>
          </xs:element>
        </xs:choice>
      </xs:complexType>
    </xs:element>
  </xs:schema>
  <aTableName Column="1"/>
</Data>

0
2/26/2007 3:25:09 PM
dotnet.xml 7266 articles. 0 followers. Follow

2 Replies
617 Views

Similar Articles

[PageSpeed] 22

"Martin Madreza" <madmakdread@yahoo.de> wrote in message 
news:1172503509.714792.40120@q2g2000cwa.googlegroups.com...
> Hi,
>
> I have a problem with reading an XmlSchema with Frameowk 2.0 and an
> own DataType. I found no example
> (searching two days).
....
> The Schema looks like following:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <Data version="V1.0.0.0">
>  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="daten"
> xmlns="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
>    <xs:element name="data" msdata:IsDataSet="true" msdata:Locale="de-
> DE">
>      <xs:complexType>
>        <xs:choice maxOccurs="unbounded">
>          <xs:element name="aTableName" msdata:Expression="Column">
>            <xs:complexType>
>              <xs:attribute name="Column" type="xs:string"
> type="xs:string" msdata:DataType="MyNamespace.MyClass, MyAssemlyName,
> Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>/>
>            </xs:complexType>
>          </xs:element>
>        </xs:choice>
>      </xs:complexType>
>    </xs:element>
>  </xs:schema>
>  <aTableName Column="1"/>
> </Data>
>
As a first guess, I'd suggest you extract that schema from the data. 
Secondly, your data does not match your schema. "Data" is not the same as 
"data".

John


0
John
2/26/2007 5:40:05 PM
hi,

yes sorry, i copied the schema from the original and modified a litte
(from german tio english)...

i extract the dqata from the data set with a testproject, the result
is, that

'msdata:DataType="MyNamespace.MyClass, MyAssemlyName'

becomes an element. it's not possible to set them (in the dataset) to
an attribute. the element is under a xs:sequence, and the structur
changes...

so far it works. but i cant set the value from the schema. in the
example below column value 1 is never set. in 1.1 everything works,
now i found nothing about what changed in 2.0 and what i have to
change to make it work. does any example exist with DataType =
OwnDataType?

hope you can help me to come forward... and sorry for the bad example.
if something ambiguous, please tell and i try to specify it

here is the example

<?xml version="1.0" standalone="yes"?>
<data>
  <xs:schema id="data" xmlns="" xmlns:xs="http://www.w3.org/2001/
XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="data" msdata:IsDataSet="true" msdata:Locale="de-
DE">
      <xs:complexType>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element name="aTableName">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="Column" type="xs:string"
msdata:DataType="MyNamespace.MyClass, MyAssemlyName, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null"/>/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:choice>
      </xs:complexType>
    </xs:element>
  </xs:schema>
  <aTableName>
    <Column>1</Column>
  </aTableName>
</data>

0
2/27/2007 9:21:36 AM
Reply:

Similar Artilces:

Compatibility #2
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) We use MS Office on both PC and Mac in our office and have massive problems opening up Office Documents on the Mac that were put together on PC's, the formatting gets totally messed up, how do I get around this ? In article <59b777c9.-1@webcrossing.caR9absDaxw>, <David_Marriott@officeformac.com> wrote: > We use MS Office on both PC and Mac in our office and have massive problems > opening up Office Documents on the Mac that were put together on PC's, the > formatting gets totally messed up, how do I get a...

How To Create UI Automation Test Suites for VC++ 7.2 Application
Hi All Envoirement -: VC++ 7.2 OS -: Win 2000,XP As i can Develop UI Automation Test Suite For .NET Application Plz Anyone tell me,Can I Develop this Tool for VC++7.2 Application ? If yes ,How ? plz suggest me for it. Regards Tarandeep Singh tarandeep@abosoftware.com Fundamentally, this is hard. There are some commercial programs out there that do this, but getting a test suite that works well, particularly in all resolutions, and is fully scriptable, is a nontrivial problem (well, let's put it this way: I would not accept a fixed-price contract to do this, and wou...

Install Office X on 2 Desktops
I have recently purchased and installed Office X on my iMac (did not register yet) I would like to know if I can also install same on my new G5 and register at that time? I can uninstall from iMac if required. Can I do 2 desktops in lieu of a desktop and a laptop? Unfortunately installing Office X on two desktops is prohibited by the terms of the EULA, and many people have posted here regarding the fact that on many occasions doing this prevents the application from launching. You'll need to uninstall the software from one of the desktop machines. You have no limitations on product regi...

setting up multiple email accounts #2
I followed the rules for setting up the pop3 and smtp accounts for multiple mail accounts, but when I access outlook express the additiona account does not recognize the password I've asked it to remember. HELP! KCB <anonymous@discussions.microsoft.com> wrote: > I followed the rules for setting up the pop3 and smtp > accounts for multiple mail accounts, but when I access > outlook express the additiona account does not recognize > the password I've asked it to remember. HELP! Ask in an Outlook Express newsgroup. -- Brian Tillman ...

Outlook Web Access attachment problem
We have a program that will generate a .snp file and then email it to whatever recipient it needs to go to. If they receive the email in Outlook it will allow them to open the file properly with the Snapshot viewer. However, if they go to the same email in OWA and try to save the attachment, it attempts to save it as an .mdb file. Why would OWA ignore the original extension and try to give it a different one? "Joe Giddings" <j_nospam_giddings@thehammocksource.com> wrote in news:jI9gd.11726$ta5.6952@newsread3.news.atl.earthlink.net: > We have a program that will genera...

mail sending problem
Hi , I am very new in the exchange server just now I have deployed Microsoft Exchange Server 2003 at my organization now i have some problem in that . I am able to send mail outside the domain except yahoo .whenever I am sending mail from my exchange mail id to any yahoo mail id it is showing me mail has been sent but on yahoo id it is not delivering even I am not getting the DFR, second I wants to know that can we take the backup of single mail box (boxs) and please tell me step by step how can we take backup (at least the location ) Thanks in Advance Madi The most probable reason is t...

Inherited DataTable Serialization Problem in WCF
Any help would be greatly appreciated. I am using WCF (3.0) to provide a services layer sitting on a server between a web server hosting ASP.NET 2.0 and SQL Server 2005. Some of these services provide a strongly typed inherited DataTable for the ASP.NET application. Below is a partial listing for one such DataTable. The code compiles successfully, and the service which returns this DataTable seems to start normally. A problem arises when using Add Service Reference in Visual Studio to generate a client class to communicate with the service. The error below the listing results wh...

Outlook OM : Method Restrict() has problems with parentheses
I'm trying to filter for a specific name using; olItems.Restrict("[From] = John Doe()"); Notice the parentheses in the string. If the string contains parentheses in it, I get the following exception. An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in ioemail.dll Additional information: Condition is not valid. How do I get Restrict to work with parentheses? Answer: olItems.Restrict("[From] = 'John Doe()'"); >-----Original Message----- >I'm trying to filter for a specific name using; >olItems.Res...

Windows Welcome Screen Login Looping Problem
Up until now no startup problems whatsoever with my system. Today, I press the start button and it boots fine to the Windows' Welcome Screen. When I click on my account icon (no password ever entered) it tries to login (I see my desktop for about 4-5 seconds) but it comes back to the same Windows' Welcome Screen after about 5-10 seconds. My significant other also has an account icon and when she tries to login from the welcome screen she can't get pass the screen either and gets the same 5-10 seconds looping problem that happens to me. System specs: Dell Deminsio...

Displaying a dataset or datatable in Excel
There's something I think ought to be easy, but I can't find a way to do it. Either there's something wrong with the way I'm searching, or there's a reason it can't be done easily. What I want is to create an excel addin that, when the user opens a spreadsheet , it goes out and fetches some data from a database, and displays it in a table. Pretty straightforward. Here's some code: void Application_WorkbookOpen(Microsoft.Office.Interop.Excel.Workbook wb) {//I've also attached this to other events. The "open" event isn't...

Incoming mail server problem
I use supanet for the internet and recently had to clear off a load of viruses and worms from my computer. Computer is clean now. I've run up to date spybot. adaware and cleaned all viruses with Mcaffee internet security as well as running stinger. Sasser, and W32 pate.b were included. Have also completed all windows updates. Everything is working fine now except my email. When I restart the computer my incoming mail server keeps changing from pop.supanet.com to a strange number. 9eg 17.02.01.10 or something similar) It also changes the user name from 3612 to 3612@supanet.com (It adds su...

GAL problem after migration from 5.5 to 2003
Hi, I have a 5.5 site (residing in an NT4 domain) that belongs to an exchange organization with a 2003 site (routing group) that resides in an AD domain. My question: How do I ensure that directory objects from this 5.5 site can be found in the GAL that is generated by the 2003 site? The GAL gets its info from the AD but this AD does not contain info from the 5.5 site as the network on which the 5.5 site resides is on a different subnet (different country!) and so the Active Directory Migration Tool cannot be used to import the objects into the AD. Any help greatly appreciated Eric hav...

problem printing with color from publisher avery label program
In the past two weeks my publisher program does not respond to my printing labels I have saved from this program. I have tried to redo the labels and colors which look correct on the screen but when I go to print the labels nothing prints on the paper in color. Is it my program or a problem with my printer connection. It still prints black. I havent changed any of the settings at all except to install two new ink cartridges black and color. Can you get viruses connected with the printer ? OR publisher. Liz, Have you checked all of your printer settings? -- JoAnn Paules MVP Micros...

Problem with Registry Access i Win XP
Hi, i program in av MFC-application and I have some problem with registry access i Win XP. It's not a common problem but it occurs on some machines. This problem has never occur on other OS. I use theApp.GetProfileString() to access the resistry. The program don't terminate och allert that something i wrong, but the value that is read is empty. The problem occurs even when the user have admin-privileges and all anti-virus programs are turned off. It there anyone that knows something about this problem ? Thanks, Johan Aronsson ...

Install Problem 09-30-04
I have CRM 1.2 and have a server dedicated for this application. I have made the server a DC running Server 2003. I have installed SQL Express. When I try to run the install, I get the error saying that SETUP COULD NOT OPEN A SESSION TO THE INSTANCE OF THE SQL SERVER. This is a brand new install of both the server and SQL. Any help would be greatly appreciated. Will CRM install with the MSDE verion or SQL Express version? Anything different one should do on a Windows 2003 box? I'm very perplexed, because I have SQL Express installed and it still can't open a session to th...

Microsoft CRM 3.0 and Microsoft VPC
Dear Forum Members: I have installed Microsoft VPC 5.3.582.45, but I can't get Microsoft CRM 3.0 (VPC image) up and running on my external hard drive. Does anyone know how to point Microsoft VPC to the Microsoft CRM VPC image loaded on my external hard drive? Please help! Thanks, I think the CRM3 VPC has expired "Caseroo" <Caseroo@discussions.microsoft.com> wrote in message news:30C46BB4-71F1-41C1-8BB2-899325493D1E@microsoft.com... > Dear Forum Members: > > I have installed Microsoft VPC 5.3.582.45, but I can't get Microsoft CRM > 3.0 > (VPC i...

how to compare 2 values in a report (Invoice Total vs Payments)
while running a report how would I set a message "out of balance" if my invoice amount (Table 1 ) does not equal the value of my total payments (table 2). If the values were the same then no message would be printed. Thank You Create a new command button to check the report before you print it. You will have to enter code for the button along the lines of: If [Invoice Total] <> [Payments] Then MsgBox "This account is out of balance" Endif "Rita" wrote: > while running a report how would I set a message "out of balance" if > my invo...

Problems performing a restore to a SAN drive
We recently move our message stores to SAN. I've tried to perform a restore to a recovery storage group on the SAN and am not able to do it. We use Ultrabac as our backup application, but I've tried NTBackup also and am getting the following errors in the App logs: Information Store (3576) Callback function call ErrESECBRestoreGetDestination ended with error 0xC7FE1F42 Database not found. and Failed to find a database to restore to from the Microsoft Active Directory. Storage Group specified on the backup media is e0d4e0af-f91a-490d-9b40-47e27b9fb714. Database speci...

Password protected #2
i have a spreadsheet is protected and requires a password...problem is dont know the password and i need to edit the sheet! Anyone got any tips.... -- Message posted from http://www.ExcelForum.com Crack it by installing this free utility at: http://www.straxx.com/excel/password.html HTH Jason Atlanta, GA >-----Original Message----- >i have a spreadsheet is protected and requires a password...problem is i >dont know the password and i need to edit the sheet! > >Anyone got any tips....? > > >--- >Message posted from http://www.ExcelForum.com/ > >. > ...

Outlook Security Settings #2
I am trying to use Outlook security settings. I have installed the settings precisely as described on the MS site and the settings work perfectly for me and one or two others but not for the rest of my defined group. We are using Exchange 2003, Outlook 2003 and Outlook XP. I cannot find any debugging or logging info anywhere and am a little stuck as to what to do next. Can anyone offer any ideas??? jON ...

Need disk # 2 for Home Publishing Premium 2000
The #2 disk of a (6) disk set in my Home Publishing Premium 2000 was demolished in my CD drive. This is the setup disk and since the CD is no longer available from Microsoft I need a copy badly. Is there anyone that can successfully copy a #2 disk? I will be more than happy to pay anyone for there trouble. Patsy wrote: > The #2 disk of a (6) disk set in my Home Publishing > Premium 2000 was demolished in my CD drive. This is the > setup disk and since the CD is no longer available from > Microsoft I need a copy badly. Is there anyone that can > successfully copy a #2 dis...

XMLA .NET connection problem
Hi, After install msxml 4.0 and XMLASDK 1.1, i proceed to configure the datasource.xml file, as follow: <DataSource> <DataSourceName>FoodMart 2000</DataSourceName> <DataSourceDescription>Microsoft Analysis Server 2000 on local machine</DataSourceDescription> <URL>http://localhost/xmla/msxisapi.dll</URL> <DataSourceInfo>Provider=MSOLAP.2;Data Source=md001144</DataSourceInfo> <ProviderName>Microsoft XML for Analysis</ProviderName> <ProviderType> <TDP/> <MDP/> <DMP/> </ProviderType>...

Problems with reading date/time format from SQL server
Helo! I made a pivot table. I get data from external source - SQL server. On of the columns is date/time type. For some reason unknown to me, Exce doesn't read this dates correctly. Instead of dots between months an days it puts little squares .. ?!? I opened the same file on m coworkers comp. and it works just fine. If anyone has already encountered this and knows how to fix it .. plase reply. thnx j -- Message posted from http://www.ExcelForum.com There may be some difficulties getting external data properly into Excel. If not done correctly you cannot use the data in formulae e....

Access violation in CDaoQueryDef::Open or CSimpleStringT::GetLength(). VC++ 6.0 app compiled in Visual C++ .NET
Hi, I have a problem using DAO in Visual C++ .net Standard edition. We have an old project created in Visual C++ 6.0 Professional. The projects compiles, links ok (with a lot of warnings telling the DAO-classes are deprecated). The compiled program executes ok until I am about to access the database. Some accesses goes ok, but some are not. It is always the same databse accesses that the program crashes on. The database that I'm using is Access 97. I also have tried converting it to 2000 and 2002. In this function the crash occurs in daocore.cpp: void CDaoQueryDef::Open(LPCTSTR lpszName...

Publisher 2003
I'm attempting to print a calendar and I keep getting the message, "Cannot load the printer driver." I have no idea what that means other than I'm unable to print my calendar. Anyone have any ideas? I get the same message whenever I try to print a card I've created. HELP! -- The computer has been chucked out the picture window and the birds are nesting in it. *sigh* Merrie wrote: > I'm attempting to print a calendar and I keep getting the message, > "Cannot load the printer driver." I have no idea what that means > other than I'm una...