I'm not sure if this is SapDB related, it might just be my own stupidity
in not being able to use ODBC properly. However, I hope that perhaps
there are some ODBC expers here that can give me a hint.
I am trying to insert into a LONG BYTE column using prepared statements
in ODBC:
// value contains a byte array in a char * pointer.
// size is a size_t that contains the number of bytes
// in above mentioned byte array (approx 9000 in this
// test)
if( SQLBindParameter( statement, index, SQL_PARAM_INPUT,
SQL_C_BINARY, SQL_BINARY, size,
0, (void *)value, size, &status )
== SQL_ERROR ) {
// error handling code removed for clarity
}
I have subclassed CDatabase and the above code is run by BindParameters
that is called by CDatabase::ExecuteSQL().
The SQLBindParameter() call works, at least it doesn't return an error,
but the ExecuteSQL() method crashes with a segmentation violation error
of some sort deep in the library code. The byte buffer pointed to by
"value" is still valid during the call (i.e. it has not been freed).
Are my arguments to SQLBindParameter() wrong somehow? Can't I use this
with LONG BYTE columns?
Thanks for any assisitance, I've spent 6 hours on this now...
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general
- RE: ODBC SQL_BINARY problem Elias Martenson
- RE: ODBC SQL_BINARY problem Koetter, Thomas Theodor
- Re: ODBC SQL_BINARY problem Elias Martenson
