freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

《c連接數(shù)據(jù)庫》ppt課件-預(yù)覽頁

2025-05-29 12:08 上一頁面

下一頁面
 

【正文】 但效率更高。 1. SQL Server .NET數(shù)據(jù)提供者 using 。 連接并使用數(shù)據(jù)庫一般步驟 ? ,如 Access, SQL Server 2022等 ? Connection對象連接數(shù)據(jù)庫 ? Command對象對數(shù)據(jù)源執(zhí)行 SQL命令并返回數(shù)據(jù) ? DataReader和 DataSet對象讀取和處理數(shù)據(jù)源的數(shù)據(jù) ? 例 1 ? using System。uid=sa。 ? string mandString = Select CustomerID,CompanyName,ContactName,Address ? + From Customers Where CustomerID = 39。 ? //創(chuàng)建 SqlDataReader對象,并執(zhí)行 ExecuteReader()方法 ? SqlDataReader mySqlDataReader = ()。 ? (mySqlDataReader[\ContactName\]= + mySqlDataReader[ContactName])。 ? //關(guān)閉 SqlDataReader對象 ? ()。本例子中的數(shù)據(jù)庫是 SQL Server2022中自帶的 Northwind數(shù)據(jù)庫。uid=sa。 ? } 其中 C:\ Access數(shù)據(jù)庫文件的位置。 ? using 。uid=sa。 ? //創(chuàng)建 SQL的 Insert語句,在 Student表中輸入一條新的記錄 ? string InsertString = INSERT INTO Student(StudentNo,StudentName,Sex) VALUES(39。,39。 ? //用 Connection對象的 Open()方法打開數(shù)據(jù)庫 ? ()。 ? ()。 ? using 。 ? namespace ADONETDeleteQuery ? { ? 刪除數(shù)據(jù)記錄 ? class ADONETDeleteQuery ? { ? static void Main(string[] args) ? { ? //連接 SQL Server2022數(shù)據(jù)庫的字符串 ? string connectionString = ? “server=localhost\hmx。 ? //創(chuàng)建 SqlConnection對象,并連接到 SQL Server2022自帶的 Northwind 數(shù)據(jù)庫 ? SqlConnection mySqlConnection = new ? SqlConnection(connectionString)。 ? = DeleteString。 ? //關(guān)閉數(shù)據(jù)庫連接 ? ()。 ? using 。uid=sa。 ? //創(chuàng)建 SQL的 Update語句,在 Student表中修改指定的記錄 ? string ModifyString = UPDATE Student SET Sex =39。 ? = ModifyString。 ? //關(guān)閉數(shù)據(jù)庫連接 ? (
點擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1