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 <[email protected]>
> An: [email protected]
> 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
> [email protected]
> 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


_______________________________________________
Bug-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-glpk

Reply via email to