By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,569 Members | 1,630 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,569 IT Pros & Developers. It's quick & easy.

Data Set Base Default Vaules

P: n/a
Using vs 2003, vb.net, MSDE...

Is there any way to set the DataSet base default values, so that each
subsequent instantiation of that base autmatically takes those default
values as their default values?

The following line only creates a default value for an instantiation of the
DataSet base, not the base itself. Meaning, each time you instantiate the
base you must instantiated all default values again for that new
instantiation.
DataSet.DataTable.ColumnName.DefaultValue = "x"

Thanks!

Bob Day
Nov 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Bob,
If I follow your question:

Have you considering creating a "template" dataset, that you then use
DataSet.Clone to get a working copy form? Once the "template" is defined,
you use DataSet.Clone from the template instead of New DataSet...

Alternatively you can define the structure (& defaults) for your DataSet in
a XSD file, then follow "New DataSet" with DataSet.ReadXmlSchema.

A third option is to define the XSD file, and enable the "Generate Dataset"
option making it a Typed Dataset.

Hope this helps
Jay

"Bob Day" <Bo****@TouchTalk.net> wrote in message
news:uv**************@tk2msftngp13.phx.gbl...
Using vs 2003, vb.net, MSDE...

Is there any way to set the DataSet base default values, so that each
subsequent instantiation of that base autmatically takes those default
values as their default values?

The following line only creates a default value for an instantiation of the DataSet base, not the base itself. Meaning, each time you instantiate the
base you must instantiated all default values again for that new
instantiation.
DataSet.DataTable.ColumnName.DefaultValue = "x"

Thanks!

Bob Day

Nov 20 '05 #2

P: n/a
Cor
Hi Bob,

Maybe others understand but I do not.
DataSet.DataTable.ColumnName.DefaultValue = "x"

Which columname is this?

But you can of course make a default datatable and than clone that to the
new.
It copies than only the schema and constraints

I hope this helps?

Cor
Nov 20 '05 #3

P: n/a
ColumnName is any column name, it doesn't matter. But, I think the cloning
is a great idea and the way to go.

Thanks!
Bob Day
"Cor" <no*@non.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi Bob,

Maybe others understand but I do not.
DataSet.DataTable.ColumnName.DefaultValue = "x"

Which columname is this?

But you can of course make a default datatable and than clone that to the
new.
It copies than only the schema and constraints

I hope this helps?

Cor

Nov 20 '05 #4

P: n/a
Hi Bob,

Thanks for using Microsoft MSDN Managed Newsgroup.
If you have concern on this issue, please post here, I will glad to help
you.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 20 '05 #5

P: n/a
Cor
Hi Peter,

If there is something wrong with my answer, please describe it to me I
always love to learn.

Cor
If you have concern on this issue, please post here, I will glad to help
you.

Best regards,

Peter Huang
Microsoft Online Partner Support

Nov 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.