题意:Langchain 无法连接到 Azure SQL 数据库
问题背景:
Trying to connect with my Azure SQL Database, it contains multiple tables.
尝试连接到我的 Azure SQL 数据库,它包含多个表。
Here's a sample of my code 下面是我的代码示例
from sqlalchemy import create_engine
driver = '{ODBC Driver 17 for SQL Server}'
odbc_str = 'mssql+pyodbc:///?odbc_connect=' \
'Driver='+driver+ \
';Server=tcp:' + os.getenv("SQL_SERVER")+'.database.windows.net;PORT=1433' + \
';DATABASE=' + os.getenv("SQL_DB") + \
';Uid=' + os.getenv("SQL_USERNAME")+ \
';Pwd=' + os.getenv("SQL_PWD") + \
';Encrypt=yes;TrustServerCertificate=no;Connection Timeout
订阅专栏 解锁全文

506

被折叠的 条评论
为什么被折叠?



