| Message: 95418 |
 |
BY: Praveen Devarao (praveend) DATE: 2010-12-03 05:09 SUBJECT: RE: Blobs not being saved Hi Simon,
From what you have mentioned looks like the issue might be in the driver. To further diagnose I have instrumented the ibm_db driver with the patch below. Kindly apply the same and let me know what output you see.
This patch is checking if the data is received in the driver and if it is received right.
--------------------
--- trunk/IBM_DB_Driver/ibm_db.c (revision 41)
+++ trunk/IBM_DB_Driver/ibm_db.c (working copy)
@@ -5551,6 +5551,7 @@
case T_FIXNUM:
curr->ivalue = FIX2LONG( *bind_data );
+ printf("\ninteger value passed is %d\n", curr->ivalue);
if(curr->data_type == SQL_BIGINT) {
valueType = SQL_C_DEFAULT;
} else {
@@ -5628,6 +5629,7 @@
tmp_str = (SQLCHAR *) rb_str2cstr( *bind_data, (long*) &curr->ivalue );
origlen = curr->ivalue;
#endif
+ printf("\nstring value is %s\n", tmp_str);
if (curr->param_type == SQL_PARAM_OUTPUT || curr->param_type == SQL_PARAM_INPUT_OUTPUT) {
/*
* An extra parameter is given by the client to pick the size of the string
@@ -6280,6 +6282,7 @@
while ( _ruby_ibm_db_SQLParamData_helper( put_param_data_args ) == SQL_NEED_DATA ) {
/* passing data value for a parameter */
+ printf("\nValue @ putdata is %s\n length is %d", ((param_node*)(put_param_data_args->valuePtr))->svalue, ((param_node*)(put_param_data_args->valuePtr))->ivalue);
rc = _ruby_ibm_db_SQLPutData_helper(put_param_data_args);
if ( rc == SQL_ERROR ) {
--------------------
Thanks
Praveen | |