Ok,在結束整個“我的方案”之前,作者最后“獻上”一段代
碼(是不是有點暈了?),希望能為您的DAF之旅劃上一個圓滿的句號J
代碼17:通過DAF更新數據
// 創建Customer數據訪問對象
CustomerDaf daf = new CustomerDaf();
// 創建Customer數據實體對象,設置對象字段值
Customer cust_1 = new Customer();
cust_1.Id = "ALFKI";
cust_1.Phone = "12345678";
// 根據Customer數據實體對象更新數據存儲
daf.UpdateCustomer(cust_1);
// 創建Customer數據實體對象,該對象內含一個數據列表
Customer cust_2 = new Customer(new ArrayList());
// 聲明另一個Customer數據實體對象,該對象用于將數據插入
// 上述Customer數據實體對象的列表中
Customer cust_obj = null;
// 創建Customer數據實體對象,設置對象字段值并將其插入cust_2實體對象中
cust_obj = new Customer();
cust_obj.Id = "ANATR";
cust_obj.Name = "Willian.Zhang";
cust_2.Add(cust_obj);
// 創建Customer數據實體對象,設置對象字段值并將其插入cust_2實體對象中
cust_obj = new Customer();
cust_obj.Id = "ANTON";
cust_obj.Name = "Xuefeng.Zhang";
cust_2.Add(cust_obj);
// 根據Customer數據實體對象中的數據列表更新數據存儲
daf.UpdateCustomers(cust_2);
下一段:http://www.csdn.net/develop/Read_Article.asp?id=27567 對該文的評論 szlen ( 2004-05-14) 陽光商務短信群發王源碼版(iSBSMS) 下載地址:http://www.szlon.com 軟件架構:三層結構(表現層+商業邏輯層+數據處理層) 開發語言:C# 數 據 庫:Access2000 程序類別:Windows應用程序 源碼價格:680/600元(會員價)
欲購源代碼請直接登陸我們的網站下單:http://www.szlen.com
軟件運行環境: 1.本軟件使用微軟最新的C#語言開發,開發工具包括:Microsoft Visual Studio .NET 2003,Macromedia Dreamweaver MX,Fireworks 4 2.客戶端需要安裝.NET Framework SDK 1.1 版. 3.支持等操作系統:Windows 98, Windows ME, Windows NT,Windows 2000, Windows Server 2003, Windows XP ---------------------------------------
軟件名稱:陽光商務郵件搜索王源碼版(iSBES) 下載地址:http://www.szlon.com 軟件架構:三層結構(表現層+商業邏輯層+數據處理層) 開發語言:C# 數 據 庫:Access2000 程序類別:Windows應用程序 源碼價格:580/500元(會員價)
欲購源代碼請直接登陸我們的網站下單:http://www.szlen.com
軟件運行環境: 1.本軟件使用微軟最新的C#語言開發,開發工具包括:Microsoft Visual Studio .NET 2003,Macromedia Dreamweaver MX,Fireworks 4 2.客戶端需要安裝.NET Framework SDK 1.1 版. 3.支持等操作系統:Windows 98, Windows ME, Windows NT,Windows 2000, Windows Server 2003, Windows XP --------------------------------------- 技術支持 QQ:17506793 MSN:sun188com@hotmail.com 網站地址:http://www.szlen.com 聯 系 人:陳先生 聯系電話:0755-26742591 傳真號碼:0755-26742783 電子郵件:sun188com@hotmail.com 軟件演示:http://www.szlon.com ---------------------------------------
|