Inserting NULLs into columns with DEFAULT constraint 
Author Message
 Inserting NULLs into columns with DEFAULT constraint
I am ignoring DTSDestination columns that have NULL
contstraints.  I am using an ActiveX script that loops
through an array to populate values from a table as
follows:

Function Main()
For i = 0 to Ubound(arFields,2)
  DTSDestination(arFields(0,i)) = DTSSource(arFields(1,i))
Next

Main = DTSTransformStat_OK
End Function

However, I keep getting INSERT failures.

When I create a sample table with the same defaults BUT
that DO allow NULLs, the default values ARE inserted.

Any thoughts?



Tue, 16 Mar 2004 01:40:37 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. Adding a column with NOT NULL constraint and user defined default

2. INSERT fails with ADO against SQL Server when have default constraints on date column

3. Default=USER causes null in column on insert

4. Default for NULL/NOT NULL column property ?

5. DTS Error: it tries to insert null into column when no not null is set

6. DTS Error: it tries to insert null into column when no not null

7. ORA-1400 - mandatory (NOT NULL) column is missing or NULL during insert

8. inserting null values into not null column in Server 7.0

9. ORA-1400 - mandatory (NOT NULL) column is missing or NULL during insert

10. Constraints: not null + default = useless?

11. How to delete a column with default constraint?


 
Powered by phpBB® Forum Software