PRSQL9109003: Bcp_sendrow Ignores Length If Terminator Exists

ID Number: Q76392

1.10 | 1.10 | 1.10

MS-DOS | OS/2 | WINDOWS

buglist1.10 fixlist1.17 fixlist1.11

Summary:

Problem ID: PRSQL9109003

SYMPTOMS

Using bcp_bind() to bind a C program variable to a column that

accepts NULLs can result in data being placed incorrectly in the

table.

CAUSE

When both a length and a terminator are specified in bcp_bind(),

the bcp_sendrow() function incorrectly assumes that the data must

be terminated and ignores the length parameter.

WORKAROUND

Only specify a terminator for bcp_bind() when the C program

variable is actually terminated.

STATUS

Microsoft has confirmed this to be a problem in DB-LIBRARY (dblib)

version 1.1. This problem has been corrected in DB-LIBRARY version

1.17, which is available from Microsoft Product Support Services.

For more information, contact your primary support provider.

Additional reference words: db-lib 1.10