Question on Use of BulkOperations
From: TSH (mathematicus_at_yahoo.com)
Date: 11/19/04
- Next message: TSH: "Re: Converting Access 2000 to SQL server..."
- Previous message: Michael Brockhoff: "Problems setting DSN from csharp when"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 19 Nov 2004 10:46:07 -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 duplicates 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 total data being a multiple of the first array?
Any hints will be appreciated
Ernesto
- Next message: TSH: "Re: Converting Access 2000 to SQL server..."
- Previous message: Michael Brockhoff: "Problems setting DSN from csharp when"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|