![](/img/trans.png)
[英]Can't connect to Microsoft SQL Server 2012 Express with Visual Studio
[英]How can I connect database(Microsoft SQL server 2012) with Mathematica?
我安裝了Microsoft SQL Server 2012並創建了新數據庫,一些新表並在該表中插入了一些值。
我想從Mathematica訪問該數據。 我閱讀了有關OpenSqlConnection[]
和JDBC[]
文檔,但沒有得到它。 我沒有在我的系統中創建任何驅動程序。
我在我的系統中安裝了數據庫,我想用Mathematica連接數據庫。
誰能幫我?
這是我的建議:
需要[ “DatabaseLink`”];
conn = OpenSQLConnection [JDBC [“Microsoft SQL Server(jTDS)”,“/”],“用戶名” - >“”,“密碼” - >“”];
bunchOfNames = SQLSelect [conn,{“Names”}]
Needs["DatabaseLink`"]
//SQL Security
conn = OpenSQLConnection[
JDBC["Microsoft SQL Server(jTDS)", "serverName:1433/"],
"Username" -> "domain\username", "Password" -> "1234",
"Catalog" -> "MathematicaTestDB", "instance" -> "I2"]
//Windows Integrated
conn = OpenSQLConnection[
JDBC["Microsoft SQL Server(jTDS)", "serverName:1433/"],
"Catalog" -> "MathematicaTestDB", "instance" -> "Instance2"]
d1 = SQLExecute[conn, "SELECT * FROM DUMMYDATA"]
對於Windows Integrated,您需要下載jTDS dist ,解壓縮ntlmauth.dll文件。 jTDS必須能夠加載本機SPPI庫(ntlmauth.dll)。 將此DLL放在系統路徑中的任何位置(由PATH系統變量定義)並且您已完成設置。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.