AMPL odbc is not avilable

264 views
Skip to first unread message

katalina.g...@sansano.usm.cl

unread,
Sep 25, 2019, 4:43:11 AM9/25/19
to AMPL Modeling Language
Hola, realice todo lo que se converso sobre el comando read_table, pero no logro hacer que el software lea el archivo. creo que mi error esta en la carpeta "ampl.exe", no logro comprender si esta carpeta se debe crear y poner cada controlador como dice en la pagina de ampl, o como debe ir esa carpeta ?
  • 32 bits
    • ampltabl.dll , controlador de tabla ODBC de 32 bits
    • tableproxy64.exe , conector para aplicaciones de 64 bits 
  • 64 bits
    • ampltabl_64.dll , controlador de tabla ODBC de 64 bits
    • ampltabl.dll , controlador de tabla ODBC de 32 bits
    • tableproxy32.exe , conector para aplicaciones de 32 bits 
este es el error que me arroja AMPL cuando intento realizar la lectura de los datos. he definido el rango en la hoja de calculo de excel, solo estoy utilizando 64 bits para excel y AMPL. como puedo solucionar este error ?



ampl: model diet.mod;
ampl: table Foods IN "ODBC" "Diet.xlsx":
ampl? FOOD <-[FOOD] ,cost, f_min,f_max;
ampl: read table Foods;
Error executing "read_table" command:

Error reading table Foods with table handler odbc:
ODBC is not available.

 quedo atenta a los comentarios. saludos! 

AMPL Google Group

unread,
Sep 25, 2019, 6:33:03 AM9/25/19
to AMPL Modeling Language
Could you please run odbcad32.exe and and send us screenshots of the tabs DNS and Drivers so that we can see all the drivers you have installed? ACEODBC.DLL drivers are 64-bit drivers and ODBCJT32.DLL are 32-bit drivers that often do not work properly and should not be used. You should use a 64-bit driver for Excel from that list.

In case you do not have ACEODBC.DLL drivers installed, you can install Microsoft Access Database Engine 2016 (https://www.microsoft.com/en-us/download/details.aspx?id=54920&751be11f-ede8-5a0c-058c-2ee190a24fa6=True) in order to install recent 64-bit drivers.

In case you have both 32 and 64 bit drivers installed and AMPL is not using the correct one, you can specify the driver name in the table declaration as follows:
table Foods "odbc" "Driver=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);ReadOnly=0;DBQ=./diet.xls" "verbose": ...
Please note that after "DBQ=" you need to either provide the complete path to the file or start the relative path with "./". The option "verbose" in the table declaration is useful to generate additional feedback about the error.


--
Filipe Brandão
am...@googlegroups.com
{#HS:964372567-55981#}
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/ampl/cce8170f-d680-488e-b2dd-61834ae2842a%40googlegroups.com.

Katalina Gonzalez

unread,
Sep 26, 2019, 5:05:04 PM9/26/19
to am...@googlegroups.com
Al introducir  table Foods "odbc" "Driver=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);ReadOnly=0;DBQ=./diet.xls" "verbose":  AMPL me arroja lo siguiente. 
AMPL ODBC driver, version 20151130.
SQLDriverConnect returned -1
sqlstate = "IM002"
errmsg = "[Microsoft][Administrador de controladores ODBC] No se encuentra el nombre del origen de datos y no se especificó ningún controlador predeterminado"
native_errno = 0

Error executing "read_table" command:

Error reading table Foods with table handler odbc:
Could not connect to "Driver=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);ReadOnly=0;DBQ=./Diet.xlsx".


Por otro lado cuando trato de instalar Microsoft Access Database Engine 2016 me sale el siguiente mensaje.  
image.png
 el Office que tengo instalado es el 365 de 64 bits, como puedo resolver este problema ? 
 

You received this message because you are subscribed to a topic in the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ampl/dE6H5lsE2EU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampl/reply-77152-964372567-2712159028-1569407578-1404322105%40helpscout.net.


--
atte,
Katalina González.
Estudiante Ingeniería Civil Industrial
Universidad Técnica Federíco Santa María. 

"Vacía tu mente, quédate sin forma, sin ninguna figura como el agua. Si pones agua en una taza se convierte en la taza, si pones agua en una tetera se convierte en la tetera. El agua puede fluir o puede golpear. 
Se agua, mi amigo".- Bruce Lee.

Katalina Gonzalez

unread,
Sep 26, 2019, 5:06:10 PM9/26/19
to am...@googlegroups.com
image.png
image.png
image.png
estos son los controladores que tengo instalados para 64 y 32. 

AMPL Google Group

unread,
Sep 27, 2019, 5:38:23 AM9/27/19
to AMPL Modeling Language
Ideally you should upgrade Excel to 64 bit too. If that is not possible you can use tableproxy which allows using 32 bit ODBC drivers with 64 bit AMPL. In order to use tableproxy you should change 'ODBC' to 'tableproxy' 'odbc' in your table declarations.

Documentation and examples can be found at: https://ampl.com/NEW/TABLEPROXY/


--
Filipe Brandão
am...@googlegroups.com
{#HS:964372567-55981#}
On Thu, Sep 26, 2019 at 9:06 PM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
image.pngimage.pngimage.png
estos son los controladores que tengo instalados para 64 y 32.

El mié., 25 de sep. de 2019 a la(s) 13:24, Katalina Gonzalez (katalina.g...@sansano.usm.cl) escribió:

Al introducir table Foods "odbc" "Driver=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);ReadOnly=0;DBQ=./diet.xls" "verbose": AMPL me arroja lo siguiente.
AMPL ODBC driver, version 20151130.
SQLDriverConnect returned -1
sqlstate = "IM002"
errmsg = "[Microsoft][Administrador de controladores ODBC] No se encuentra el nombre del origen de datos y no se especificó ningún controlador predeterminado"
native_errno = 0
Error executing "read_table" command:

Error reading table Foods with table handler odbc:
Could not connect to "Driver=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);ReadOnly=0;DBQ=./Diet.xlsx".

Por otro lado cuando trato de instalar Microsoft Access Database Engine 2016 me sale el siguiente mensaje.
image.png
el Office que tengo instalado es el 365 de 64 bits, como puedo resolver este problema ?

El mié., 25 de sep. de 2019 a la(s) 07:33, AMPL Google Group (am...@googlegroups.com) escribió:

On Thu, Sep 26, 2019 at 9:05 PM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
Al introducir table Foods "odbc" "Driver=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);ReadOnly=0;DBQ=./diet.xls" "verbose": AMPL me arroja lo siguiente.
AMPL ODBC driver, version 20151130.
SQLDriverConnect returned -1
sqlstate = "IM002"
errmsg = "[Microsoft][Administrador de controladores ODBC] No se encuentra el nombre del origen de datos y no se especificó ningún controlador predeterminado"
native_errno = 0
Error executing "read_table" command:

Error reading table Foods with table handler odbc:
Could not connect to "Driver=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);ReadOnly=0;DBQ=./Diet.xlsx".

Por otro lado cuando trato de instalar Microsoft Access Database Engine 2016 me sale el siguiente mensaje.
image.png
el Office que tengo instalado es el 365 de 64 bits, como puedo resolver este problema ?

El mié., 25 de sep. de 2019 a la(s) 07:33, AMPL Google Group (am...@googlegroups.com) escribió:

On Wed, Sep 25, 2019 at 10:32 AM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
Could you please run odbcad32.exe and and send us screenshots of the tabs DNS and Drivers so that we can see all the drivers you have installed? ACEODBC.DLL drivers are 64-bit drivers and ODBCJT32.DLL are 32-bit drivers that often do not work properly and should not be used. You should use a 64-bit driver for Excel from that list.

In case you do not have ACEODBC.DLL drivers installed, you can install Microsoft Access Database Engine 2016 (https://www.microsoft.com/en-us/download/details.aspx?id=54920&751be11f-ede8-5a0c-058c-2ee190a24fa6=True) in order to install recent 64-bit drivers.

In case you have both 32 and 64 bit drivers installed and AMPL is not using the correct one, you can specify the driver name in the table declaration as follows:
table Foods "odbc" "Driver=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);ReadOnly=0;DBQ=./diet.xls" "verbose": ...
Please note that after "DBQ=" you need to either provide the complete path to the file or start the relative path with "./". The option "verbose" in the table declaration is useful to generate additional feedback about the error.


--
Filipe Brandão
am...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages