當前位置:首頁 » 編程語言 » 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 「確定」 啟動。

熱點內容
安卓如何實現點擊彈出列表 發布:2025-09-18 02:47:25 瀏覽:52
python文件函數 發布:2025-09-18 02:47:23 瀏覽:568
pythonwrap 發布:2025-09-18 02:46:32 瀏覽:326
伺服器與計算機有什麼區別 發布:2025-09-18 02:07:26 瀏覽:930
python不支持的數據類型有 發布:2025-09-18 01:50:23 瀏覽:643
長江存儲科技招聘 發布:2025-09-18 01:44:48 瀏覽:767
斯維爾加密狗 發布:2025-09-18 01:31:00 瀏覽:252
手把手win7搭建web伺服器 發布:2025-09-18 01:25:53 瀏覽:730
硬碟緩存128m 發布:2025-09-18 01:15:13 瀏覽:757
蘋果手機設備密碼是指什麼 發布:2025-09-18 01:02:26 瀏覽:470