2015-12-06 45 views
0

我想通過Smartfox API連接到我的Azure SQL數據庫。使用Smartfox API連接到Windows Azure數據庫

我打開管理面板,單擊區域配置器模塊,雙擊我的區域並單擊數據庫管理器。

它要求我提供:

Database Driver Class: {SQL Server Native Client 10.0}; //Not sure about this got it from https://azure.microsoft.com/en-us/documentation/articles/sql-database-dotnet-how-to-use/ 
Connection String: Database=databaseName;Data Source=us-cdbr-azure-central-a.cloudapp.net;User Id=userId;Password=password //I get from the Azure portal under settings->properties 
Username: userId 
Password: password 

這是不連接。 Smartfox支持Azure嗎?

其實這可能是因爲我沒有合適的適配器。這是正確的嗎? https://www.microsoft.com/en-us/download/details.aspx?id=36434我在哪裏把這個放在smartfox目錄下?

回答

1

您應該能夠使用JDBC驅動程序連接到Azure SQL。請嘗試將.jar文件放入{SFS2XRoot}/lib/文件夾中。

必需的驅動程序和使用Azure SQL的JDBC使用步驟可在this article中找到。

另外我在smartfox網站上發現了this tutorial,或許有幫助。

希望這會有所幫助!

https://azure.microsoft.com/en-us/documentation/articles/sql-database-develop-java-simple-windows/

http://smartfoxserver.com/blog/?p=58

+0

我smartfox已經建立了JDBC。我的連接字符串一定有問題。 –

+0

1)你把驅動程序放在lib文件夾下? 2)以下是供您參考的連接字符串樣本 String connectionString = 「jdbc:sqlserver://your_server.database.windows.net:1433;」 +「database = your_database;」 +「user = your_user @ your_server;」 +「password = your_password;」 +「encrypt = true;」 +「trustServerCertificate = false;」 +「hostNameInCertificate = *。database.windows.net;」 +「loginTimeout = 30;」; – neolursa

+0

是的,但我無法將整個連接字符串輸入smartfox。我必須以問題中顯示的格式輸入 –

相關問題