Connect to SQL Azure containing backend for MS Access Web App

前端 未结 7 646
余生分开走
余生分开走 2021-02-06 04:46

Ok not sure what to enter in the subject line so apologies if it stands unclear.

I created a simple web app using MS Access 2013. It simply had one table with sample dat

7条回答
  •  梦谈多话
    2021-02-06 05:14

    Just to be clear and provide some searchable text for this problem, Vikas has nailed this: "Cannot open server ... requested by the login. Client with IP address ... is not allowed to access the server. To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range. It may take up to five minutes for this change to take effect" ... (Microsoft SQL Server, Error: 40615)

    For those that think an Azure login is required.. there is none, when you use MS Acces to create a web app it imports data from the sources you specify but it then creates a new database on the azure platform and exports the data to that database. So the database cannot be managed through the azure portal (even when if the original data source was an Azure database!). A note of caution: The database structure created is pretty complex with lots of tables devoted to integrating with sharepoint/web app requirements etc. Messing around with the tables too much is inevitably going to break something!

    Also worthy of note, using SQL 11 driver you can create ODBC source but not with SQL Native driver as you cannot specify database name until you have logged in to server. The later versions allow you to move to specifying database before connecting (although you may have to enter the password AFTER changing the database name from "default". Or make your own from script:

    [ODBC]
    
    DRIVER=SQL Server Native Client 11.0
    
    UID= [userid from MSAccess]
    
    Pwd=[password from MSAccess]
    
    Encrypt=yes
    
    DATABASE= [database from MSAccess]
    
    SERVER=tcp:[server from MSAccess]
    

提交回复
热议问题