Problem Note 16053: "Error binding parameters: [ODBC SQL Server Driver] Attempt to bulk-copy
a NULL value into a Server column which does not accept NULL values"
When inserting data into a SQL Server column with the BCP option and not
explicitly specifying the literal value in the INSERT statements, you
receive the following error:
ERROR: Error binding parameters: [Microsoft][ODBC SQL Server
Driver]Attempt to bulk-copy a NULL value into a Server column which
does not accept NULL values
ERROR: ROLLBACK issued due to errors for data set
MYDB.cwddefault.DATA.
For example, the table definition for CWDDEFAULT is as follows:
create table cwddefault (col1 int, col2 int not null default 0)
/* Create a SAS data set containing data to be loaded into the
dbms table */
libname mydb odbc dsn=sqdb uid=dbitest pwd=dbigrp1 bcp=yes;
data foo;
col1=1;output;
col1=2;output;
run;
/* Insert records into the dbms table */
proc sql;
insert into x.cwddefault(col1) select * from foo;
quit;
This SAS code generates the above error.
This will be fixed in SAS 9.2. The current workaround is to use a
literal "0" inside the select statement. For example:
proc sql;
insert into x.cwddefault(col1, col2) select col1, 0 from foo;
quit;
Select the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | SAS/ACCESS Interface to ODBC | Microsoft Windows XP Professional | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows 2000 Server | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows 2000 Professional | 9.1 TS1M3 | 9.2 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | medium |
Topic: | SAS Reference ==> LIBNAME Engines Third Party ==> Information Exchange ==> ODBC (Open Database Connectivity)
|
Date Modified: | 2006-04-26 09:20:40 |
Date Created: | 2005-08-29 21:03:03 |