“USE statement is not supported to switch between databases” when running query

家住魔仙堡 提交于 2019-12-06 04:14:22

In response to @Pondlife's last comment above and since he has not made it an answer I will do it for him until he posts it himself.

@Pondlife comment:

I have no experience with Azure myself, but the error message is very clear: you can't change databases with USE in SQL Azure. I don't know how or if you can prevent your particular client libraries issuing a USE command, but I would try removing the mssql_select_db() call completely and specify the correct database name in your ODBC DSN. Hopefully that will connect you directly to the database you want to use. - PondLife

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!