Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5962

Database Connection issue with pyobdc Robot Framework

$
0
0

Im trying to connect to a mssql database using Robot Framework the code runs in a Ubuntu image in a Openshift pod.

I'm using the following connection string

Connect To Database pyodbc ${DBName} ${DBUser} ${DBPass} ${DBHost} ${DBPort}

On windows it works fine, when I run through ubuntu I get the following error

('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found (0) (SQLDriverConnect)")

I have installed DatabaseLibrary, pyodbc and msodbcsql18 to the Ubuntu image.

odbcinst -j gives me the following results

unixODBC 2.3.11DRIVERS............: /etc/odbcinst.iniSYSTEM DATA SOURCES: /etc/odbc.iniFILE DATA SOURCES..: /etc/ODBCDataSourcesUSER DATA SOURCES..: /root/.odbc.iniSQLULEN Size.......: 8SQLLEN Size........: 8SQLSETPOSIROW Size.: 8

i tried updating the connection string to

Connect To Database pyodbc ${DBName} ${DBUser} ${DBPass} ${DBHost} ${DBPort}dbDriver='msodbcsql18' dbConfigFile=/etc/odbcinst.ini

but I get the same error


Viewing all articles
Browse latest Browse all 5962

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>