bug-glpk
[Top][All Lists]
Advanced

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

Re: [Bug-glpk] Assertion failed: str2num(buf, &num) == 0 Error detected


From: glpk xypron
Subject: Re: [Bug-glpk] Assertion failed: str2num(buf, &num) == 0 Error detected in file ..\src\glpsql.c at line 900
Date: Sun, 14 Feb 2010 02:34:24 +0100

Hello Noli,

the error you described occurs if a numeric column contains
a NULL.

The following changes should be done to the coding:

Line 900 and 1508 in glpsql.c
            xassert(str2num(buf, &num) == 0);
should be replaced by
            if (str2num(buf, &num) != 0) {
               xprintf("'%s' cannot be converted to a number.\n", buf);
               return 1;
            }

The output for a NULL value will be something like:

Connected to ACCESS 04.00.0000 - .\glpk
SELECT * FROM query1
'' cannot be converted to a number.
test.mod:3: error on reading data from table ti
MathProg model processing error

Best regards

Xypron




-------- Original-Nachricht --------
> Datum: Fri, 12 Feb 2010 14:14:11 +0700
> Von: Noli Sicad <address@hidden>
> An: address@hidden
> Betreff: [Bug-glpk] Assertion failed: str2num(buf,    &num) == 0 Error 
> detected in file ..\\src\\glpsql.c at line 900

> Andrew,
> 
> I got this error.
> 
> ~~~~~~~~~
> Assertion failed: str2num(buf, &num) == 0
> Error detected in file ..\src\glpsql.c at line 900
> ~~~~~~~~
> 
> Doing this,  Reading data from a query, not a table.
> 
> ~~~~~~~~~
> table qryCroptype IN "ODBC"
>     'DSN=Otago_mdb'
>     'SELECT * FROM qryCroptype':
>       CROPTYPE <- [Croptype], CroptypeOrigin ~ Origin, CroptypeSpecies ~
> Species,
>       Value, Rental, Share, Flat, FlatRolling, RollingSteep, Steep, OpType;
> ~~~~~~~~
> 
> Thanks. Noli
> 
> 
> _______________________________________________
> Bug-glpk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-glpk

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01




reply via email to

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