PC Review


Reply
Thread Tools Rate Thread

DataSet on the fly

 
 
JPS
Guest
Posts: n/a
 
      16th Jan 2007
Does anyone know how to create a dataset on the fly with specific names
fields?

 
Reply With Quote
 
 
 
 
cbmeeks
Guest
Posts: n/a
 
      16th Jan 2007
DataSet ds = new DataSet("dsName");
ds.Tables.Add("dtTable");
ds.Tables["dtTable"].Columns.Add("ZipCodes");

http://www.codershangout.com


JPS wrote:
> Does anyone know how to create a dataset on the fly with specific names
> fields?


 
Reply With Quote
 
JPS
Guest
Posts: n/a
 
      16th Jan 2007
Thanks. Do you know how to add values to this as well?

On Jan 16, 9:01 am, "cbmeeks" <cbme...@gmail.com> wrote:
> DataSet ds = new DataSet("dsName");
> ds.Tables.Add("dtTable");
> ds.Tables["dtTable"].Columns.Add("ZipCodes");
>
> http://www.codershangout.com
>
>
>
> JPS wrote:
> > Does anyone know how to create a dataset on the fly with specific names
> > fields?- Hide quoted text -- Show quoted text -


 
Reply With Quote
 
Ignacio Machin \( .NET/ C# MVP \)
Guest
Posts: n/a
 
      16th Jan 2007
Hi,

You mean like

DataRow row = ds.Tables[0].NewRow();
row["ZipCodes"] = "12345";



--
Ignacio Machin
machin AT laceupsolutions com


"JPS" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
| Thanks. Do you know how to add values to this as well?
|
| On Jan 16, 9:01 am, "cbmeeks" <cbme...@gmail.com> wrote:
| > DataSet ds = new DataSet("dsName");
| > ds.Tables.Add("dtTable");
| > ds.Tables["dtTable"].Columns.Add("ZipCodes");
| >
| > http://www.codershangout.com
| >
| >
| >
| > JPS wrote:
| > > Does anyone know how to create a dataset on the fly with specific
names
| > > fields?- Hide quoted text -- Show quoted text -
|


 
Reply With Quote
 
cbmeeks
Guest
Posts: n/a
 
      16th Jan 2007
Ignacio Machin beat me to it.

http://www.codershangout.com



JPS wrote:
> Thanks. Do you know how to add values to this as well?
>
> On Jan 16, 9:01 am, "cbmeeks" <cbme...@gmail.com> wrote:
> > DataSet ds = new DataSet("dsName");
> > ds.Tables.Add("dtTable");
> > ds.Tables["dtTable"].Columns.Add("ZipCodes");
> >
> > http://www.codershangout.com
> >
> >
> >
> > JPS wrote:
> > > Does anyone know how to create a dataset on the fly with specific names
> > > fields?- Hide quoted text -- Show quoted text -


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to cast object of type 'System.Data.DataSet' to Typed DataSet Optimus Microsoft VB .NET 1 31st Jan 2006 06:26 AM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ADO .NET 7 9th Dec 2003 02:50 PM
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ADO .NET 2 31st Oct 2003 01:05 PM
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ASP .NET 2 31st Oct 2003 01:05 PM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ASP .NET 2 31st Oct 2003 02:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:58 AM.