P
Programmer
Hi All
Here is my problem
I'm using a SQLDataAdapter and DataSet
I use the method FillSchema(myDataset, SchemaType.Source)
The problem is that when i Check the default Values of the Dataset
i can see that the DefaultValue of the columns is system.dbnull!!!!
But in SQL Server i have put as default values in a bigint field the '0' and
the field is also required
The Dataset is bound to a Datagrid and it's totaly disconected from the
server (Custom Control)
So because i handle the event of new row i must perform the AddRow at my
own.
I have capture the event and handle it for many reasons. And i can't change
it.
this is the code
Dim nr As DataRow = myDataset.Tables(0).NewRow
dsData.Tables(0).Rows.Add(nr)
Then i have the crash!. And the reason is that no Default Values exists from
the FillSchema call
Where is my default value??????????????????
How can i get them from the SQL????
Thank you in advance.
Kind Regards
Dimitris
Here is my problem
I'm using a SQLDataAdapter and DataSet
I use the method FillSchema(myDataset, SchemaType.Source)
The problem is that when i Check the default Values of the Dataset
i can see that the DefaultValue of the columns is system.dbnull!!!!
But in SQL Server i have put as default values in a bigint field the '0' and
the field is also required
The Dataset is bound to a Datagrid and it's totaly disconected from the
server (Custom Control)
So because i handle the event of new row i must perform the AddRow at my
own.
I have capture the event and handle it for many reasons. And i can't change
it.
this is the code
Dim nr As DataRow = myDataset.Tables(0).NewRow
dsData.Tables(0).Rows.Add(nr)
Then i have the crash!. And the reason is that no Default Values exists from
the FillSchema call
Where is my default value??????????????????
How can i get them from the SQL????
Thank you in advance.
Kind Regards
Dimitris