Click here to Skip to main content
16,005,473 members
Home / Discussions / C#
   

C#

 
GeneralRe: Dynamic Properties Pin
Steve Schaneville26-May-04 16:34
professionalSteve Schaneville26-May-04 16:34 
GeneralRe: Dynamic Properties Pin
Heath Stewart27-May-04 4:43
protectorHeath Stewart27-May-04 4:43 
GeneralRe: Dynamic Properties Pin
Steve Schaneville27-May-04 4:46
professionalSteve Schaneville27-May-04 4:46 
GeneralDesigning Window Form Shape Pin
RonBou26-May-04 14:20
RonBou26-May-04 14:20 
GeneralRe: Designing Window Form Shape Pin
Heath Stewart27-May-04 4:40
protectorHeath Stewart27-May-04 4:40 
GeneralDataset Select Error Pin
MrJJKoolJ26-May-04 12:38
MrJJKoolJ26-May-04 12:38 
GeneralRe: Dataset Select Error Pin
Heath Stewart26-May-04 13:01
protectorHeath Stewart26-May-04 13:01 
GeneralRe: Dataset Select Error Pin
MrJJKoolJ27-May-04 15:39
MrJJKoolJ27-May-04 15:39 
Hi Heath,

I did what you said, read in the schema first then the xml diffgram file. This goes smoothly but as soon as I hit new row on dataset I get the nullrefexception. I named the table statement as "Table1" too. Here's my schema file and xml file maybe u can see something I don't:

<code>
<b>XML Diff File</b>

<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<Table1><Table diffgr:id="Table1" msdata:rowOrder="0">
<MR_ID>110</MR_ID>
<MR_Date>2003-12-01T00:00:00.0000000-05:00</MR_Date>
<Coal_Feeder_Tot>690058</Coal_Feeder_Tot>
<Coal_Silo_Level_Prct>73</Coal_Silo_Level_Prct>
<Coal_Barn_Inv_Prct>25</Coal_Barn_Inv_Prct>
<Limestone_Feed_Total>171316</Limestone_Feed_Total>
<LS_Silo_Level_Prct>70</LS_Silo_Level_Prct>
<Ammonia_Totalizer>388974</Ammonia_Totalizer>
<Prop_to_Burn_Totalizer>14629</Prop_to_Burn_Totalizer>
<TwentyFourHr_SO2_Reduct>92</TwentyFourHr_SO2_Reduct>
<Limestone_Received>40800.37</Limestone_Received>
<Ammonia_Received>0</Ammonia_Received>
<Prop_Received>9004</Prop_Received>
<Est_hours_Dry_Oper_Hours>0</Est_hours_Dry_Oper_Hours>
<LAB_Sulfur_Content_Prct>2.13</LAB_Sulfur_Content_Prct>
<LAB_High_Heat_Val>6833</LAB_High_Heat_Val>
<CEMS_SO2_Daily_Avg>549</CEMS_SO2_Daily_Avg>
<Raw_Water_Pump_Meter>15795967</Raw_Water_Pump_Meter>
<Reservoir_Level>1844</Reservoir_Level>
<Date_Rec_Added>2003-12-08T08:47:15.0000000-05:00</Date_Rec_Added>
</Table>
</Table1>
</diffgr:diffgram>

<b>Schema</b>

<?xml version="1.0" standalone="yes"?>
<xs:schema id="Table1" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="Table1" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Table">
<xs:complexType>
<xs:sequence>
<xs:element name="MR_ID" type="xs:long" minOccurs="0" />
<xs:element name="MR_Date" type="xs:dateTime" minOccurs="0" />
<xs:element name="Coal_Feeder_Tot" type="xs:decimal" minOccurs="0" />
<xs:element name="Coal_Silo_Level_Prct" type="xs:decimal" minOccurs="0" />
<xs:element name="Coal_Barn_Inv_Prct" type="xs:decimal" minOccurs="0" />
<xs:element name="Limestone_Feed_Total" type="xs:decimal" minOccurs="0" />
<xs:element name="LS_Silo_Level_Prct" type="xs:decimal" minOccurs="0" />
<xs:element name="Ammonia_Totalizer" type="xs:decimal" minOccurs="0" />
<xs:element name="Prop_to_Burn_Totalizer" type="xs:decimal" minOccurs="0" />
<xs:element name="TwentyFourHr_SO2_Reduct" type="xs:decimal" minOccurs="0" />
<xs:element name="Limestone_Received" type="xs:decimal" minOccurs="0" />
<xs:element name="Ammonia_Received" type="xs:decimal" minOccurs="0" />
<xs:element name="Prop_Received" type="xs:decimal" minOccurs="0" />
<xs:element name="Est_hours_Dry_Oper_Hours" type="xs:int" minOccurs="0" />
<xs:element name="Est_hours_Dry_Oper_Mins" type="xs:int" minOccurs="0" />
<xs:element name="LAB_Sulfur_Content_Prct" type="xs:decimal" minOccurs="0" />
<xs:element name="LAB_High_Heat_Val" type="xs:decimal" minOccurs="0" />
<xs:element name="CEMS_SO2_Daily_Avg" type="xs:int" minOccurs="0" />
<xs:element name="SO2_Daily" type="xs:decimal" minOccurs="0" />
<xs:element name="Raw_Water_Pump_Meter" type="xs:decimal" minOccurs="0" />
<xs:element name="Reservoir_Level" type="xs:decimal" minOccurs="0" />
<xs:element name="Comments" type="xs:string" minOccurs="0" />
<xs:element name="Date_Rec_Added" type="xs:dateTime" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>


</code>

This is the line it errors on :

nRow = dsDiff.Tables["Table1"].NewRow();


Thanks,

JJ
GeneralRe: Dataset Select Error Pin
Heath Stewart30-May-04 6:03
protectorHeath Stewart30-May-04 6:03 
GeneralString format: Real newbie question Pin
pankajdaga26-May-04 11:23
pankajdaga26-May-04 11:23 
GeneralRe: String format: Real newbie question Pin
Nick Parker26-May-04 11:42
protectorNick Parker26-May-04 11:42 
GeneralRe: String format: Real newbie question Pin
pankajdaga26-May-04 11:51
pankajdaga26-May-04 11:51 
GeneralRe: String format: Real newbie question Pin
pankajdaga26-May-04 12:00
pankajdaga26-May-04 12:00 
GeneralRe: String format: Real newbie question Pin
Heath Stewart26-May-04 12:03
protectorHeath Stewart26-May-04 12:03 
GeneralRe: String format: Real newbie question Pin
Nick Parker26-May-04 13:32
protectorNick Parker26-May-04 13:32 
GeneralResolution independent forms Pin
MaxPredator26-May-04 10:14
MaxPredator26-May-04 10:14 
GeneralRe: Resolution independent forms Pin
Heath Stewart26-May-04 10:53
protectorHeath Stewart26-May-04 10:53 
GeneralRe: Resolution independent forms Pin
MaxPredator27-May-04 2:33
MaxPredator27-May-04 2:33 
GeneralCustom Control Initialization - first time drop on win form Pin
Member 64401626-May-04 8:59
Member 64401626-May-04 8:59 
GeneralRe: Custom Control Initialization - first time drop on win form Pin
Heath Stewart26-May-04 9:06
protectorHeath Stewart26-May-04 9:06 
Generalstrstr in VC# Pin
hubertus9526-May-04 8:52
hubertus9526-May-04 8:52 
GeneralRe: strstr in VC# Pin
Heath Stewart26-May-04 9:04
protectorHeath Stewart26-May-04 9:04 
GeneralRe: strstr in VC# Pin
Baris Kurtlutepe26-May-04 9:04
Baris Kurtlutepe26-May-04 9:04 
GeneralRe: strstr in VC# Pin
Anonymous26-May-04 9:50
Anonymous26-May-04 9:50 
GeneralMultimedia namespace Pin
26-May-04 8:10
suss26-May-04 8:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.