I am trying to create a cloudfaundry app on bluemix. It uses linux by default as a server. i am getting below error while i am tring to connect sql server db on azure
error:
pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'SQL
Server' : file not found (0) (SQLDriverConnect)")
The code for connecting to db is here . I am using flask
@app.route('/sql/<lat>/<long>')
def api_sql(lat,long):
cnxn =pyodbc.connect('DRIVER{SQLServer};SERVER=prashantvikramsingh.database.windows.net;DATABASE=Zillow;UID=UserId;PWD=pass')
cursor = cnxn.cursor()
There is similar question here. How to do this step while deploying the app on bluemix. This step can be done in local machine. But how to do it on cloud? . Is there any way to fix this error
thse are the contents of envirnment.yml file in local
name: pyodbc-test
dependencies:
- pyodbc
- flask
- itsdangerous
- Jinja2
- MarkupSafe
- Werkzeug
- unixODBC