Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 获得';[IM002][Microsoft][ODBC驱动程序管理器]&x27;错误,Azure SQL,Azure函数?_Python_Visual Studio Code_Azure Functions_Azure Sql Database_Pyodbc - Fatal编程技术网

Python 获得';[IM002][Microsoft][ODBC驱动程序管理器]&x27;错误,Azure SQL,Azure函数?

Python 获得';[IM002][Microsoft][ODBC驱动程序管理器]&x27;错误,Azure SQL,Azure函数?,python,visual-studio-code,azure-functions,azure-sql-database,pyodbc,Python,Visual Studio Code,Azure Functions,Azure Sql Database,Pyodbc,我正试图按照Azure提供的文档从Azure函数(Python)访问Azure SQL 代码在云上运行时,在使用Visual Studio代码在本地运行时出现“[IM002][Microsoft][ODBC驱动程序管理器]数据源名称未找到且未指定默认驱动程序(0)(SQLDriverConnection)”错误 driver='{ODBC驱动程序17 for SQL Server}' 注意:我正在使用pyodbc连接到数据库,使用Azure Functions核心工具在本地运行Azure Fun

我正试图按照Azure提供的文档从Azure函数(Python)访问Azure SQL

代码在云上运行时,在使用Visual Studio代码在本地运行时出现“[IM002][Microsoft][ODBC驱动程序管理器]数据源名称未找到且未指定默认驱动程序(0)(SQLDriverConnection)”错误

driver='{ODBC驱动程序17 for SQL Server}'


注意:我正在使用pyodbc连接到数据库,使用Azure Functions核心工具在本地运行Azure Function。

您需要在计算机中安装此驱动程序:
[IM002][Microsoft][ODBC驱动程序管理器]
@Venkataraman R仅用于查询目的,这意味着Azure云功能应用程序(linux)已经有ODBC驱动程序!对它似乎是linux映像的默认配置,用于运行azure功能: