473,386 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Need Help From Expert

I have down load some source codes from the internet and it wasn't worked
right, but I'm really know what's wrong about it. May some expert help me
please...I'm deeply appreciated for your help. Have a nice day...

Kate

the code look like this:
string strPersonSchema = "PersonPet.xsd";

XmlDataDocument datadoc = new XmlDataDocument();
datadoc.Dataset.DataSetName = "PersonPet";

// Create tables for people and pets
DataTable people = new DataTable( "Person" );

// Set up the columns in the Tables
DataColumn personname = new DataColumn( "Name", typeof(String) );
DataColumn personAge = new DataColumn( "Age", typeof(Int32) );

// Add columns to person table
DataColumn id = people.Columns.Add( "ID", typeof(Int32) );
id.AutoIncrement = true;
people.PrimaryKey = new DataColumn[]{ id };
people.Columns.Add( personname );
people.Columns.Add( personAge );

// Add tables to the DataSet
datadoc.Dataset.Tables.Add( people );

// Create new Row
DataRow mark = people.NewRow();
mark[personname] = "Mark";
mark[personAge] = 18;
people.Rows.Add( mark );

// commit changes
dataset.AcceptChanges();
try
{
StreamWriter writer = new StreamWriter( strPersonSchema );
datadoc.DataSet.WriteXmlSchema( writer );
if( writer != null )
writer.Close();
}
catch( Exception Err )
{
MessagBox.Show( Err.Message.ToString() );
}
Nov 15 '05 #1
1 1597
Kate Luu <cq***@yahoo.com> wrote:
I have down load some source codes from the internet and it wasn't worked
right, but I'm really know what's wrong about it. May some expert help me
please...I'm deeply appreciated for your help. Have a nice day...


Could you tell us what you're hoping it will do, and in what way it
fails to do that?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gary Stollman | last post by:
My Father is a Clone//ETs plotting to overthrow the human race! On August 19, 1987 a gun-carrying Gary Stollman entered the studio of Los Angeles's KNBC television, crashing consumer reporter...
31
by: mark | last post by:
Hello- i am trying to make the function addbitwise more efficient. the code below takes an array of binary numbers (of size 5) and performs bitwise addition. it looks ugly and it is not elegant...
4
by: Cpierswim | last post by:
I am a Java developer who uses J#. I really like the express edition stuff (the word completion tool alone makes J# better than any other Java development software), but I get ticked off about how...
10
by: L. R. Du Broff | last post by:
I own a small business. Need to track a few hundred pieces of rental equipment that can be in any of a few dozen locations. I'm an old-time C language programmer (UNIX environment). If the only...
3
by: apattin | last post by:
Hi all, I need some expert advice on a ROLLUP fine point. summary_table table has 4 columns: file_id primary_site morphology primary
23
by: vinod.bhavnani | last post by:
Hello all, I need desperate help Here is the problem: My problem today is with multidimensional arrays. Lets say i have an array A this is a 4 dimensional static array.
8
by: Santos L Halper | last post by:
i cant believe that im the only person that has ever run into this problem. im using a very simple table to layout a page. the table has 3 columns, with the middle column being where the data will...
31
by: Don Leverton | last post by:
Hi Folks, I've been away from this NG for quite a while, persuing other interests etc. I have made a few posts / replies here lately, and find this whole NG thing a little awkward and...
0
by: onegative | last post by:
G'day Y'all, I was hoping to get some expert feedback on a proposal I am considering regarding a new internal application to help fill some gaps in our IT department. I have some configuration...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.