SQLBulkOperations question
From: TSH (mathematicus_at_yahoo.com)
Date: 11/19/04
- Previous message: Kevin Yu [MSFT]: "RE: wrong language"
- Next in thread: Dmitri Ivanov: "Re: SQLBulkOperations question"
- Reply: Dmitri Ivanov: "Re: SQLBulkOperations question"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 19 Nov 2004 11:46:39 -0500
In trying to write to a table WITH a primary key, suppose that there are TWO
different arrays containing the desired data that need to be written one
after the other. The arrays are not of the same length.
The procedure would be something like:
SQLBindCol(StmtHndl, column, SQL_dataType, Pointer to array1...
SQLBulkOperations(StmtHndl,SQL_ADD,...
SQLBindCol(StmtHndl, column, SQL_dataType, Pointer to array2...
SQLBulkOperations(StmtHndl,SQL_ADD,...
Upon doing this,
The first array is written ok, but onthe second BulkOps the driver gives an
error saying that duplicate values are being written though there are NO
such duplcates between the contents of the arrays.
The error seems to be given on the SECOND row of the array2, the first row
gets written ok.
Other symptoms:
If the table does not have a primary key things go ok.
OR
If the first arrays is recycled to hold the second batch of data SO THAT the
second BINDCOL is deleted, things go ok.
So I need to know how can one write more than one array of data via BulkOps
without the totla data being a multiple of the first array?
Any hints will be appreciated
Ernesto
- Previous message: Kevin Yu [MSFT]: "RE: wrong language"
- Next in thread: Dmitri Ivanov: "Re: SQLBulkOperations question"
- Reply: Dmitri Ivanov: "Re: SQLBulkOperations question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|