Well, thank you all for your posts.
Mr. Erkan clarified my problam exactly.
i need to do this automaticaly, i can't edit the xsd everytime i need
to re-create the schemes (once in a while the db may change).
so what i finally did, is to query the sysobjects table in my sql
server.
this is the query:
select dbo.syscomments.text, sysobjects.Name as TableName,
dbo.syscolumns.* from dbo.syscolumns
inner join dbo.syscomments on cdefault = dbo.syscomments.ID
inner join sysobjects on sysobjects.id = syscolumns.id
where sysobjects.name = 'ANY_TABLE_NAME'
so i ran in a loop through all my tables, query the systable to get
any default columns, and then i can do set the default (object) to the
column in the dataset.
i knew in the first place that this is an option, but i thought maybe
there is way to do that "from the box" in .NET (so, i guess there
isn't?)
thank you all.
"W.G. Ryan eMVP" <(E-Mail Removed)> wrote in message news:<#(E-Mail Removed)>...
> itzik:
>
> I'm not sure I follow you. You may or may not even have a dataset that
> matches the whichever table you are defaulting to. An adapter is going to
> move data from the database to the dataset or datatable - that'll will be
> defined in the SelectCommand - so you can point it to any dataset you want.
>
> --
> W.G. Ryan, MVP
>
> www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
> "itzik" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > hello
> >
> > I wanted to ask how to get the default value defined in the DataBase,
> > to be defined as the default value in the DS scheme?
> >
> > and if there isn't a way, how else can i do that?
> >
> > thanks.