Loader with "NOT NULL DEFAULT VALUE" fields
Posted: Tue 27 Oct 2015 08:16
[UniDac 6.1.5]
Hello,
I'm facing a case I don't know how to handle. In a SQL Server database, I have a table with some "NOT NULL DEFAULT VALUE" fields.
In my application, I have a bulk of data to load in this table with a TUniLoader. But some of the data doesn't permit to "calculate" those fields values. So I want the server apply their "DEFAULT VALUE" constraints.
The problem is that I can't find a way to inform TUniLoader a column is "not assigned" (neither valued nor "null"). It seems TUniLoader consider not assigned values as null and send "null" to the server. And then the server raises a "Not null" exception.
Until now, the only way I found is to load data in two phases: a phase with pre-calculated "not null default value" fields, and a phase where those fields are excluded from TUniLoader. Not very convenient in my case.
So, is there a way to prevent TUniLoader to send "Null" when the field is "Unassigned" ?
(with SQLServer provider, it seems the case when MSParam.IsBound is False, but nothing allows to change this property)
Hello,
I'm facing a case I don't know how to handle. In a SQL Server database, I have a table with some "NOT NULL DEFAULT VALUE" fields.
In my application, I have a bulk of data to load in this table with a TUniLoader. But some of the data doesn't permit to "calculate" those fields values. So I want the server apply their "DEFAULT VALUE" constraints.
The problem is that I can't find a way to inform TUniLoader a column is "not assigned" (neither valued nor "null"). It seems TUniLoader consider not assigned values as null and send "null" to the server. And then the server raises a "Not null" exception.
Until now, the only way I found is to load data in two phases: a phase with pre-calculated "not null default value" fields, and a phase where those fields are excluded from TUniLoader. Not very convenient in my case.
So, is there a way to prevent TUniLoader to send "Null" when the field is "Unassigned" ?
(with SQLServer provider, it seems the case when MSParam.IsBound is False, but nothing allows to change this property)