Click here to Skip to main content
15,898,371 members
Home / Discussions / C#
   

C#

 
GeneralBackColor for MainMenu Pin
hybrid7912-Jan-05 19:39
hybrid7912-Jan-05 19:39 
Generalproblem with fontdialog Pin
The Nemesis12-Jan-05 19:33
The Nemesis12-Jan-05 19:33 
GeneralSmartClient Pin
IamADotNetGuy12-Jan-05 18:44
IamADotNetGuy12-Jan-05 18:44 
GeneralRe: SmartClient Pin
Michael P Butler13-Jan-05 9:04
Michael P Butler13-Jan-05 9:04 
Generalbinary file reading and converting Pin
bwagz12-Jan-05 18:19
bwagz12-Jan-05 18:19 
Generalerror in this c# program Pin
dhol12-Jan-05 17:55
dhol12-Jan-05 17:55 
GeneralRe: error in this c# program Pin
leppie12-Jan-05 21:49
leppie12-Jan-05 21:49 
GeneralRe: error in this c# program Pin
dhol13-Jan-05 1:03
dhol13-Jan-05 1:03 
Hi Now I had incremented k,But I find that in the first row, first value of the element(both element name same in schema and input xml) first value is from input value and other values for that columns are those specified for automatic insertion like castlehampers1, 2...etc.. and first row of other elements are null and from necxt row they are correct.
pls help me to do.

ie, my output was like this
--------------------------------------------------------------------------- -ie under the elemnet name "billto_name"(datatype-> string) the values as(james frank, castle hamper1, castle hamper2..etc.. up to 200)
under the element name "dividend" (datatype -> float) the values as (null, 5.5,6.5....)
under the element name "section"(datatype-> double ) the values as (null,8887,8886....)
-------------------------------------------------------------------------


u can see that it takes only the first value from input xml(ie, james frank is the value which is taken from input xml file) others like castle hamper1,2 are given by me in the program for a string datatype . And also the other values are correct from the second row and why it didnt assign a value for the first row (why its showing null).so pls help me to do this.

private void button2_Click(object sender, System.EventArgs e)
{
dataSet1.ReadXmlSchema(txtSchema.Text);//txtschema is the schema file
XmlDocument xdc = new XmlDocument();
foreach (DataTable dTbl in dataSet1.Tables)
{
object[] oValues = new object[dTbl.Columns.Count];
xdc.Load(@"C:\CDEV\generator\testdatagenerator\FIELDNAMES.xml");
int i=0, iIndex=0;
foreach (DataColumn dColmn in dTbl.Columns)
{
if(dColmn.ColumnName.ToString() == "billto_name")
{
iIndex = i;
break;
}
i++;
}
//INPUT XML FILE
xdc.Load(@"C:\CDEV\generator\testdatagenerator\billtoname.xml");
XmlNodeList nodeRows;
XmlElement Root = xdc.DocumentElement;
nodeRows = Root.SelectNodes("//billto_name");
for(int j = 0; j <= 200; j++)
{
int k = 0;
foreach (DataColumn dColmn in dTbl.Columns)
{
if(j == iIndex && j
GeneralRe: error in this c# program Pin
leppie13-Jan-05 4:57
leppie13-Jan-05 4:57 
GeneralRe: error in this c# program Pin
dhol13-Jan-05 16:52
dhol13-Jan-05 16:52 
GeneralChange image property of a picturebox object at run time Pin
Einar Kvandahl12-Jan-05 15:45
Einar Kvandahl12-Jan-05 15:45 
GeneralRe: Change image property of a picturebox object at run time Pin
Adam Goossens13-Jan-05 1:01
Adam Goossens13-Jan-05 1:01 
GeneralClass / Database design document Pin
econner12-Jan-05 15:17
econner12-Jan-05 15:17 
GeneralRe: Class / Database design document Pin
Adam Goossens13-Jan-05 1:05
Adam Goossens13-Jan-05 1:05 
GeneralWindows ContextMenu... Pin
new_phoenix12-Jan-05 13:45
new_phoenix12-Jan-05 13:45 
GeneralRe: Windows ContextMenu... Pin
Guinness4Strength12-Jan-05 13:52
Guinness4Strength12-Jan-05 13:52 
GeneralRe: Windows ContextMenu... Pin
new_phoenix13-Jan-05 9:24
new_phoenix13-Jan-05 9:24 
GeneralDirectX 9 &amp; c# problem Pin
dratcha12-Jan-05 12:28
dratcha12-Jan-05 12:28 
GeneralSimple ListBox Event Pin
Snowjim12-Jan-05 12:27
Snowjim12-Jan-05 12:27 
GeneralRe: Simple ListBox Event Pin
Stefan Troschuetz12-Jan-05 21:41
Stefan Troschuetz12-Jan-05 21:41 
GeneralRe: Simple ListBox Event Pin
Snowjim12-Jan-05 23:21
Snowjim12-Jan-05 23:21 
GeneralRe: Simple ListBox Event Pin
Stefan Troschuetz12-Jan-05 23:30
Stefan Troschuetz12-Jan-05 23:30 
GeneralVS.NET Add-In Problem Pin
Guinness4Strength12-Jan-05 12:13
Guinness4Strength12-Jan-05 12:13 
GeneralARRAY LIST Pin
suthagar12-Jan-05 10:29
suthagar12-Jan-05 10:29 
GeneralRe: ARRAY LIST Pin
Christian Graus12-Jan-05 10:53
protectorChristian Graus12-Jan-05 10:53 

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.