I've changed the field in the table to now be declared as a BLOB(30000) and I'm using the below bind parameter statement with this, however I'm still seeing the same problem. When the first byte is reached that contains 0 (NULL character), the rest of what's in ptr is ignored. ptr is declared as unsigned char ptr[30000]. For testing purposes, I've just been using a for loop and storing the value of the counter % 255 + 1 so that all the characters except for NULL are represented. Then I've gone in and just inserted a 0 value in a few places. Anyone know how I can get the full contents of ptr to be stored?
Code:
SQLBindParameter(handleStmt, 3, SQL_PARAM_INPUT, SQL_C_BINARY,
SQL_BLOB, (SQLUINTEGER)30000, 0, ptr, (SQLINTEGER)30000, &sqlNts);
Also, here is the format of the INSERT statement that I'm trying to use:
Code:
char *insertStmt =
"INSERT INTO TESTTABLE (CATEGORY, TOPIC, DATA) VALUES(?, ?, CAST(? AS BLOB(30000)))";