Kiran,
What's interesting is that the column Default works just fine if you are
programmatically adding Rows to the DataTable, just not when you're using the
DataAdapter.Fill() ... I tried to find some overload of the .Fill() method
that might get around this, but couldn't. Sounds like a bug with the
DataAdapter, but so far I haven't found a way around it.
~~Bonnie
"Kiran" wrote:
> Hi,
>
> I am using typed dataset for Employees Table and found a problem, can anyone tell me what's wrong
>
> Case 1:
>
> Employees Table:
> ID: int,Not Null,Idendity, Primary col
> Name:varchar(20),Not Null
> Type: Varchar(5), Null(Allowed)
>
> When I retrieve data and fill into the typed dataset from the above table(select ID,Name from Employees), Works fine
>
> Case 2:
>
> Employees Table:
> ID: int,Not Null,Idendity, Primary col
> Name:varchar(20),Not Null
> Type: Varchar(5), Not Null,Default Value: ('')
>
> When I retrieve data and fill into the typed dataset from the above table(select ID,Name from Employees), doesn't work
>
> I get a constraint exception in this case bcos Type column is not selected.
>
> But Type column has a default value(''), It should work right?
>
> doesn't works, any Ideas?????
>
> Thanks
> Kiran
|