ODBC is not available

99 views
Skip to first unread message

Juan Zhang

unread,
Jul 14, 2018, 1:52:04 AM7/14/18
to AMPL Modeling Language
Hi,

I am trying to write my results to a spreadsheet in the following manner:

table results OUT "ODBC" "Res.xls":
{g in GENERATORS} -> [Generators],
{t in TIME} < P[g,t] ~ (t)>;

write table results;

My variable is: 

var P{GENERATORS,TIME} >= 0; 

The following error appears after execution:

 Error at _cmdno 200 executing "write_table" command
(file Run.run, line 23, offset 346):

Error writing table results with table handler odbc:
ODBC is not available.

Any pointers?

AMPL Google Group

unread,
Jul 15, 2018, 8:33:55 PM7/15/18
to Ampl Modeling Language
This error indicates that no ODBC driver for excel was found. Could you please run odbcad32.exe and send us screenshots of the tabs "User DSN" and "Drivers" so that we can see all the ODBC drivers that you have installed? ACEODBC.DLL drivers are 64 bit drivers and ODBCJT32.DLL are 32 bit drivers. Please note that you if you want to use a 32-bit ODBC driver with 64-bit AMPL or vice-versa, you need to use tableproxy (see, e.g., https://groups.google.com/d/msg/ampl/Gw8W2M7eyKI/jQYp-x-UK5UJ). In case you have multiple drivers for Excel, you can specify the driver name in the table declaration (see, e.g., https://groups.google.com/d/msg/ampl/tJaZJuJwI9g/-sg_UBvnBwAJ).

In case you do not have any ODBC driver available for Excel, you should install Microsoft Access Database Engine 2016 (https://www.microsoft.com/en-us/download/details.aspx?id=54920&751be11f-ede8-5a0c-058c-2ee190a24fa6=True)

--
Filipe Brandão
am...@googlegroups.com
{#HS:620479452-14274#}
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.



Reply all
Reply to author
Forward
0 new messages