converted to pyodbc
added missing imports