當前位置:首頁 » 編程語言 » 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-07-02 22:14:01 瀏覽:597
安卓qq直播怎麼分享聲音 發布:2025-07-02 22:13:21 瀏覽:248
安卓系統怎麼刷機清除內存 發布:2025-07-02 22:08:19 瀏覽:696
安卓手機6位數密碼有多少組 發布:2025-07-02 21:50:31 瀏覽:797
存儲卡視頻多了 發布:2025-07-02 21:49:40 瀏覽:850
ajax無刷新上傳圖片 發布:2025-07-02 21:32:56 瀏覽:117
編譯器不認pow函數 發布:2025-07-02 21:27:04 瀏覽:339
w10隱藏文件夾 發布:2025-07-02 21:27:03 瀏覽:534
電腦d盤拒絕訪問 發布:2025-07-02 21:27:02 瀏覽:779
pythonif字元串比較大小 發布:2025-07-02 21:23:18 瀏覽:127