If you using OLEDB TextFile Driver with schema.ini for interface data from textfile
for import to SQL Server Database
And If you want to import null value to not null key. you must to detect null value
before insert to table but Text Driver cannot use SQL Function such as ISNULL(field, anyvalue)
because limitation of Driver
Solution
1. You interface data from Text file with OLEDB Text Driver with schema.ini to
DataTable Object
2. Update DataTable Object with not null field to specific value such as '' (Blank)
3. Use SQLBulk Object for Interface data to SQL Server
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น