Koetter, Thomas Theodor wrote:
That would certainly explain things, however unfortunately it's plain old 32-bit. This is run on Windows 2000 and compiled with VC++ 6.0.Hi Elias,-----Original Message----- From: Elias Martenson [mailto:[EMAIL PROTECTED]][snip]// 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 }This looks alright. However, which data types do you use for size and status? And which platform do you use? 64 bit?
Update: I did do a quick test just before leaving the office today and it "seems" to crash when connecting to an MS SQL server instance as well. I will look further into this tomorrow. If this indeed is the case, it _must_ be me that does something wrong.
The variable "size" is, as I mentioned a size_t (typedefed to unsigned long in VC++ I believe). status is a SQLINTEGER (since the SQLBindParameter method is declared to take an SQLINTEGER * as argument). The variable status (poor name, I know) contains the same value as the variable "size" (approx 9000, the number of bytes in the byte array pointed to by "value").
I also tried changing the SQL_BINARY to SQL_LONGVARBINARY but to no avail (what are the differences between those anyway?).
In the same way as I'm setting up this parameter, I'm also setting up strings that are written into LONG VARCHAR columns and those work (none of those are particularily long though, could this be a problem with the length of the byte array?).
Oh, for SapDB, this is all on the 7.4 beta release. The connections are done to the local machine.
Thanks in advance for any hints
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general
