V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Achilless
V2EX  ›  问与答

django 连接 sqlserver 失败,未发现数据源名称并且未指定默认驱动程序

  •  
  •   Achilless · May 21, 2019 · 1490 views
    This topic created in 2536 days ago, the information mentioned may be changed or developed.

    请问会是什么原因,我安装了如下包: django-mssql 1.8 django-pyodbc 1.1.3 django-pyodbc-azure 2.1.0.0 pymssql 2.1.4 pyodbc 4.0.26

    settings 中设置如下: DATABASES = { 'default': { 'ENGINE': 'sql_server.pyodbc', 'NAME': 'collect', 'USER': 'sa', 'PASSWORD': 'password', 'HOST': '10.23.212.xxx', 'PORT': '1433', 'OPTIONS':{ 'driver':'SQL Server Native Client 10.0', } } }

    直接在 shell 里面 import pyodbc 测试也是不行,odbc 驱动没用过,会不会是位数不匹配

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2267 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 00:58 · PVG 08:58 · LAX 17:58 · JFK 20:58
    ♥ Do have faith in what you're doing.