[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] Help with Error: [....] requires numeric data

From: Maria Vasardani
Subject: [Help-glpk] Help with Error: [....] requires numeric data
Date: Mon, 29 Nov 2010 20:06:31 +0000

Dear all,
I am encountering this error when running a file:  The [parameter_name] requires numeric data. 
I have asked the parameter to get data from a MySQL table column.  I read from a similar message that I need to apply a certain patch:

--- glpk-4.44/src/glpsql.c      2010-09-05 09:02:46.000000000 +0000
> +++ glpk-4.44_NUM/src/glpsql.c  2010-09-05 09:05:53.000000000 +0000
> @@ -1511,7 +1511,7 @@
>             len = 255;
>          strncpy(buf, (const char *) row[i-1], len);
>          buf[len] = 0x00;
> -         if (0 != (fields[i-1].flags & NUM_FLAG))
> +         if (IS_NUM(fields[i-1].type))
>          {  strspx(buf); /* remove spaces*/
>             if (str2num(buf, &num) != 0)
>             {  xprintf("'%s' cannot be converted to a number.\n", buf);

But I am not really familiar with how to do this. I opened the glpl-4.44/src/glpsql.c file, found the appropriate lines, did the changes and then saved it and closed it. Then I run again the 'make' command for building the glpk package. Is that enough? Because that did not seem to solve the problem. My apologies for the newbie questions, I am not familiar with how someone applies patches to glpk. 

Thank you in advance for all your help and patience. 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]