[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] [Fwd: Re: GMPL table stmt]
From: |
Andrew Makhorin |
Subject: |
[Help-glpk] [Fwd: Re: GMPL table stmt] |
Date: |
Fri, 28 Jun 2013 02:47:27 +0400 |
-------- Forwarded Message --------
From: technical forestry services <address@hidden>
To: address@hidden
Subject: Re: GMPL table stmt
Date: Fri, 28 Jun 2013 10:12:22 +1200
Hello again
Forgot to mention I am running Windows 7.
Thanks LRB
On 28/06/2013 10:06 a.m., technical forestry services wrote:
> Hello
>
> I have been trying to get GMPL to read an SQLite3 database using the
> following syntax.
>
> set I ;
> set J ;
> set S dimen 2;
>
> param c{i in I, j in J} ;
> param d{i in I, j in J} ;
>
> # table statement creates indexed parameters c[i, j] and d[i, j]
> # and set S comprising (string) indices (i, j)
> table tbl IN "iODBC"
> 'DSN=SQLite3 Datasource'
> 'SELECT id, srce, dest, dist, cost '
> 'FROM Ytij':
> S <- [srce, dest], d~dist, c~cost ;
>
> data ;
> set I := Seattle San-Diego ;
>
> set J := New-York Chicago Topeka ;
> end ;
>
> There seems to be an issue with the table statement in that the code
> will compile OK
> and by adding GMPL printf and display statements will correctly list
> the database contents
> during the compile phase. However during any Build phase I get the
> following error message:
>
> Reading tbl...
> Failed to connect
>
> The driver reported the following diagnostics whilst running
> SQLDriverConnect
> IM014:1:0:[Microsoft][ODBC Driver Manager] The specified DSN contains
> an architecture mismatch between the Driver and Application
> Test_glpk_sqlite3.mod:27: error on opening table tbl
> MathProg model processing error
> >Exit code: 1 Time: 0.228
>
> I have tried a couple of SQLite-ODBC drivers without success:
> 1) sqliteodbc.exe available at www.ch-werner.de/sqliteodbc (installs
> with (System) DSN=SQLite3 Datasource).
> 2)sqlite odbc driver as part of SQLite2009 Pro Enterprise Manager
> (installs with (System) DSN=DSN_SQLite2010Pro).
> SQLite2009 Pro Manager is available at
> www.sqlite.org/cvstrac/wiki?p=ManagementTools .
>
> Changing the driver has no effect as the same error is reported during
> the Build phase.
>
> I attach the database that I attempted to read from.
>
> If you can shed any light on the issue I would be extremely grateful.
>
> If you require further information don't hesitate to make contact.
>
> Would you please acknowledge receipt of this E-mail.
>
> Regards
>
> LRB
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-glpk] [Fwd: Re: GMPL table stmt],
Andrew Makhorin <=