>>>>> "Samir" == Samir Guermach <gu@stripped> writes:
Samir> Hi
Samir> I was charged with testing the MySql Server and its odbc driver, to find out if
> it can work with the applications we wrote,
Samir> in order to use MySql on our mobile computers
Samir> I had problems writing or updating blob columns.
Samir> I'm using MySql version 3.21.29a-gamma, and the odbc driver 2.50.22.
Samir> The following piece of code is not working:
Samir> char buff[40000];
Samir> long cbdataPtr=SQL_DATA_AT_EXEC;
Samir> SQLBindParameter(statement,(),1,SQL_PARAM_INPUT,
Samir> SQL_C_BINARY,SQL_LONGVARBINARY,
Samir> 40000,0,(void*)1,40000,&cbdataPtr);
Samir> rc=SQLExecDirect(statement,"insert into testtable values(?)",SQL_NTS)
Samir> void* token;
Samir> if(rc!=SQL_SUCCESS)
Samir> {
Samir> if(rc==SQL_NEED_DATA)
Samir> {
Samir> while((rc=SQLParamData(statement,&token))==SQL_NEED_DATA)
Samir> {
Samir> if(rc!=SQL_NEED_DATA)
Samir> {
Samir> cout<<"error occured"<<endl;
Samir> }
Samir> rc= SQLPutData(statement.stmt(),buff,40000);
Samir> }
Samir> }
Samir> else
Samir> {
Samir> cout<<"error occured"<<endl;
Samir> }
Samir> }
Samir> testtable contains only a blob column. Everything seem to be correct but in the
> table there are no results wrote and the table is still empty.
Samir> Thanks in advance
Samir>
> Samir Guermach
Samir>
> Insiders GmbH
Samir>
> gu@stripped
Hi!
Could you mail me a MyODBC trace file when you run the above?
Regards,
Monty