Sql server ('42S02',“[42S02][Microsoft][SQL Server的ODBC驱动程序13][SQL Server]无效的对象名称'app_poll'。(208)(SQLExecDirectW)”)

Sql server ('42S02',“[42S02][Microsoft][SQL Server的ODBC驱动程序13][SQL Server]无效的对象名称'app_poll'。(208)(SQLExecDirectW)”),sql-server,django,django-models,azure-sql-database,Sql Server,Django,Django Models,Azure Sql Database,在azure web应用程序上使用python odbc azure lib运行python django应用程序时,我获得了以下信息 ProgrammingError at / ('42S02', "[42S02] [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Invalid object name 'app_poll'. (208) (SQLExecDirectW)") Method

在azure web应用程序上使用python odbc azure lib运行python django应用程序时,我获得了以下信息

    ProgrammingError at /

     ('42S02', "[42S02] [Microsoft][ODBC Driver 13 for SQL Server][SQL 
     Server]Invalid object name 'app_poll'. (208) (SQLExecDirectW)")

       Method:  GET
       Request URL:     http://retailgenieredsky.azurewebsites.net/
       Django Version:  1.11
       Exception Type:  ProgrammingError
       Exception Value:     

       ('42S02', "[42S02] [Microsoft][ODBC Driver 13 for SQL Server][SQL 
       Server]Invalid object name 'app_poll'. (208) (SQLExecDirectW)")

       Exception Location:  D:\home\python354x64\lib\site-
       packages\sql_server\pyodbc\base.py in execute, line 545
       Python Executable:   D:\home\python354x64\python.exe
       Python Version:  3.5.4
       Python Path:     

       ['.',
       'D:\\home\\python354x64\\python35.zip',


     'D:\\home\\python354x64\\DLLs',
     'D:\\home\\python354x64\\lib',
     'D:\\home\\python354x64',
     'D:\\home\\python354x64\\lib\\site-packages',
     'D:\\home\\site\\wwwroot']

    Server time:    Fri, 22 Dec 2017 13:10:47 +0000
    Error during template rendering

    In template D:\home\site\wwwroot\app\templates\app\layout.html, error at line 5
    42S02
    1   <!DOCTYPE html>
    2   <html>
    3   <head>
    4       <meta charset="utf-8" />
    5       <meta name="viewport" content="width=device-width, initial-scale=1.0">
    6       <title>{{ title }} - Django Polls</title>
    7       {% load staticfiles %}
    8       <link rel="stylesheet" type="text/css" href="{% static 'app/content/bootstrap.min.css' %}" />
    9       <link rel="stylesheet" type="text/css" href="{% static 'app/content/site.css' %}" />
    10      <script src="{% static 'app/scripts/modernizr-2.6.2.js' %}"></script>
    11  </head>
    12  
    13  <body>
    14      <div class="navbar navbar-inverse navbar-fixed-top">
    15    <div



 class="container">
我尝试了以下方法。 1.除去

五,

但对于下一行,它给出了相同的错误

我试图删除layout.html,但仍然会出现相同的错误 这是更深层次的例外

chunked_fetch   

False

cursor  

<django.db.backends.utils.CursorDebugWrapper object at 0x00000064038E4F28>

params  

()

result_type     

'multi'

self    

<sql_server.pyodbc.compiler.SQLCompiler object at 0x00000064038E4668>

sql     

('SELECT TOP 5 [app_poll].[id], [app_poll].[text], [app_poll].[pub_date] FROM '
 '[app_poll] ORDER BY [app_poll].[pub_date] DESC')
这段代码似乎可以连接mssql数据库,但无法获取数据。我的理解正确吗

我也是django、mssql和azure的初学者。任何潜在客户都将受到高度赞赏


感谢

异常是因为azure sql server尚未创建表。所以需要进行数据库迁移以在azure上创建表来解决此问题。

嘿,我知道有点晚了,但请详细说明您的解决方案。@ascii\U walker,请详细说明您的解决方案。这将对我们有所帮助。