當前位置:首頁 » 編程語言 » sql管理系統代碼

sql管理系統代碼

發布時間: 2024-10-07 23:00:51

Ⅰ 怎樣用SQL寫一個倉庫管理系統

首先配置SQLSERVER2005:

打開」Microsoft SQL Server Management Studio「 直接用Windows 用戶連接進入,再在「安全性」中的「登錄名」內的「新建登錄名」,你就對應的添好「確定」就可以了。

再在你對應的「資料庫」里「安全性」用戶,把你建的用戶添加進去。

關鍵地方,查看「伺服器 屬性」在 「安全性」選上 「SQL Server 和 Windows 身份驗證模式」點 「確定」系統會提示你重新啟動SQL Server 你「停止」重啟一下就配好了。

接著看C#連接SQL Server2005的代碼語句:

strcon = strcon + @"Data Source=" + strcons[0];
strcon = strcon + "," + strcons[2] + ";";
strcon = strcon + "Network Library=" + strcons[1] + ";";
strcon = strcon + "Initial Catalog=" + strcons[3] + ";";
strcon = strcon + "User ID=" + strcons[4] + ";";
strcon = strcon + "Password=" + strcons[5] + ";";
strcon = strcon + "Persist Security Info=True";

strcons[0] 伺服器名稱,一般添機器的IP
strcons[1]協議DBMSSOCN(為tcp/ip協議)
strcons[2]]埠號,一般為1433
strcons[3] 資料庫名
strcons[4] 用戶名
strcons[5]密碼

埠號也要配置一下:

在控制面板里的服務和應用程序中的SQL Server配置管理中的SQL Server 2005網路配置內的SQL

Server2005的協議TCP/IP默認為已禁用,在它的屬性設置它的埠號為1433 「確定」 啟動。

熱點內容
centos自帶python 發布:2024-10-08 00:53:31 瀏覽:340
android串口調試助手 發布:2024-10-08 00:45:03 瀏覽:405
sqlserver2008亂碼 發布:2024-10-08 00:39:59 瀏覽:220
華為電腦伺服器系統進不去提示 發布:2024-10-08 00:13:42 瀏覽:491
登錄密碼如何獲取 發布:2024-10-07 23:58:40 瀏覽:425
王者榮耀人機腳本 發布:2024-10-07 23:58:33 瀏覽:809
地標建築腳本 發布:2024-10-07 23:48:51 瀏覽:242
sqlorderby 發布:2024-10-07 23:42:13 瀏覽:958
qq秒源碼 發布:2024-10-07 23:41:37 瀏覽:471
51單片機編譯器 發布:2024-10-07 23:28:04 瀏覽:798