BioBytes Messages: 307 Registered: October 2008 Location: France
Senior Member
Hello Koldo,
Just to make the point about the compilation issue. I just update my UPP to version 4874 and now all projects (including Controls4U_Demo) is compiling perfectly either in debug and release modes using either MSC9 (SDK 6.1) or MSC10 (SDK 7.1). I did not understand really why but I think some change(s) have been implemented between UPP 4705 and UPP 4874 as the same compilation issue occurred on 2 different computers (my personal PC at home and the machine I used in my company). Moving to UPP 4874 has solved the problem on both computers (!).
When compiling in release optimal mode a project including the MySql layer for direct connection to the server (native mode), I have noticed a "bug" in the MySql.cpp file (line 275) as shown hereafter:
if(result)
{
DDUMP(rows);// This is the problem in optimal mode
int fields = mysql_num_fields(result);
info.SetCount(fields);
convert.Alloc(fields, false);
for(int i = 0; i < fields; i++) {
MYSQL_FIELD *field = mysql_fetch_field_direct(result, i);
SqlColumnInfo& f = info[i];
f.name = field->name;
switch(field->type) {
case FIELD_TYPE_TINY:
case FIELD_TYPE_SHORT:
case FIELD_TYPE_LONG:
case FIELD_TYPE_INT24:
f.type = INT_V;
break;
case FIELD_TYPE_LONGLONG:
case FIELD_TYPE_DECIMAL:
case FIELD_TYPE_FLOAT:
case FIELD_TYPE_DOUBLE:
f.type = DOUBLE_V;
break;
case FIELD_TYPE_DATE:
f.type = DATE_V;
break;
case FIELD_TYPE_DATETIME:
case FIELD_TYPE_TIMESTAMP:
f.type = TIME_V;
break;
case FIELD_TYPE_VAR_STRING:
case FIELD_TYPE_STRING:
convert[i] = true;
default:
f.type = STRING_V;
break;
}
f.width = field->length;
f.scale = f.precision = 0;
}
....
I had to modify it as follows:
if(result)
{
#if DEBUG //new line
DDUMP(rows);
#endif //new line
int fields = mysql_num_fields(result);
...