《《電子商務(wù)網(wǎng)站》PPT課件》由會(huì)員分享,可在線閱讀,更多相關(guān)《《電子商務(wù)網(wǎng)站》PPT課件(33頁(yè)珍藏版)》請(qǐng)?jiān)谘b配圖網(wǎng)上搜索。
1、,電子商務(wù)網(wǎng)站與網(wǎng)頁(yè),電子商務(wù)網(wǎng)站與網(wǎng)頁(yè),電子商務(wù)網(wǎng)站與網(wǎng)頁(yè),ASP動(dòng)態(tài)網(wǎng)站開(kāi)發(fā)基礎(chǔ)教程 陳建偉編著,客戶(IE瀏覽器),Web服務(wù)器,數(shù)據(jù)庫(kù)服務(wù)器,應(yīng)用程序服務(wù)器,HTTP請(qǐng)求,HTML文檔,動(dòng)態(tài)頁(yè)面,處理結(jié)果,訪問(wèn)數(shù)據(jù),訪問(wèn)結(jié)果,趙,第9章 ADO數(shù)據(jù)庫(kù)訪問(wèn)技術(shù),Access,訪問(wèn)數(shù)據(jù)庫(kù),HOME,第9章 訪問(wèn)數(shù)據(jù)庫(kù)9.1 應(yīng)用Access數(shù)據(jù)庫(kù),HOME,數(shù)據(jù)庫(kù)(DB),按邏輯結(jié)構(gòu)存儲(chǔ)數(shù)據(jù),數(shù)據(jù)庫(kù)管理系統(tǒng)(DBMS),管理數(shù)據(jù)的軟件,記錄,字段,術(shù)語(yǔ),表,數(shù)據(jù)庫(kù)術(shù)語(yǔ),創(chuàng)建數(shù)據(jù)庫(kù),SQL語(yǔ)句,第9章 訪問(wèn)數(shù)據(jù)庫(kù)9.1 應(yīng)用Access數(shù)據(jù)庫(kù),HOME,創(chuàng)建數(shù)據(jù)庫(kù),1、打開(kāi)Access,2、
2、新建數(shù)據(jù)庫(kù)db1.mdb,3、新建數(shù)據(jù)表table1,數(shù)據(jù)庫(kù)術(shù)語(yǔ),創(chuàng)建數(shù)據(jù)庫(kù),SQL語(yǔ)句,第9章 訪問(wèn)數(shù)據(jù)庫(kù)9.1 應(yīng)用Access數(shù)據(jù)庫(kù),HOME,創(chuàng)建數(shù)據(jù)庫(kù),打開(kāi)Access,Microsoft Office Microsoft Office Access 2003,數(shù)據(jù)庫(kù)術(shù)語(yǔ),創(chuàng)建數(shù)據(jù)庫(kù),SQL語(yǔ)句,菜單欄,工具欄,狀態(tài)欄,工作區(qū),新建數(shù)據(jù)庫(kù),點(diǎn)擊空數(shù)據(jù)庫(kù),新建數(shù)據(jù)庫(kù)名db1.mdb,新建表,設(shè)計(jì)表的視圖,學(xué)號(hào),學(xué)號(hào),右鍵點(diǎn)擊“學(xué)號(hào)”,點(diǎn)擊“主鍵”,使“學(xué)號(hào)”具有唯一性,也就是表中記錄不能有相同學(xué)號(hào)。,點(diǎn)擊“保存”或關(guān)閉“設(shè)計(jì)視圖”窗口,新建表的名稱,新建數(shù)據(jù)庫(kù)db1中新建表table1
3、,新建數(shù)據(jù)庫(kù)db1.mdb,001 Alice,為表添加數(shù)據(jù),第9章 訪問(wèn)數(shù)據(jù)庫(kù)9.1 應(yīng)用Access數(shù)據(jù)庫(kù),HOME,SQL(結(jié)構(gòu)化查詢語(yǔ)言),插入,刪除,修改,查詢,INSERT,DELETE,UPDATE,SELECT,數(shù)據(jù)庫(kù)術(shù)語(yǔ),創(chuàng)建數(shù)據(jù)庫(kù),SQL語(yǔ)句,第9章 訪問(wèn)數(shù)據(jù)庫(kù)9.1 應(yīng)用Access數(shù)據(jù)庫(kù),HOME,SQL,插入,INSERT INTO (, ,),VALUES (, ,),INSERT INTO table1 (學(xué)號(hào),姓名),VALUES (33883, 周),數(shù)據(jù)庫(kù)術(shù)語(yǔ),創(chuàng)建數(shù)據(jù)庫(kù),SQL語(yǔ)句,第9章 訪問(wèn)數(shù)據(jù)庫(kù)9.1 應(yīng)用Access數(shù)據(jù)庫(kù),HOME,SQL,刪除,
4、DELETE FROM WHERE ,DELETE FROM table1 WHERE 姓名= 周,數(shù)據(jù)庫(kù)術(shù)語(yǔ),創(chuàng)建數(shù)據(jù)庫(kù),SQL語(yǔ)句,第9章 訪問(wèn)數(shù)據(jù)庫(kù)9.1 應(yīng)用Access數(shù)據(jù)庫(kù),HOME,SQL,修改,UPDATE ,SET =, =,UPDATE table1,SET 學(xué)號(hào)= 010,WHERE ,WHERE 姓名=周,數(shù)據(jù)庫(kù)術(shù)語(yǔ),創(chuàng)建數(shù)據(jù)庫(kù),SQL語(yǔ)句,第9章 訪問(wèn)數(shù)據(jù)庫(kù)9.1 應(yīng)用Access數(shù)據(jù)庫(kù),HOME,SQL,查詢,SELECT *,FROM table1,WHERE 姓名= 趙,SELECT ,FROM ,ORDER BY ASC|DESC,WHERE ,數(shù)據(jù)庫(kù)術(shù)語(yǔ),創(chuàng)
5、建數(shù)據(jù)庫(kù),SQL語(yǔ)句,第9章 訪問(wèn)數(shù)據(jù)庫(kù)9.1 應(yīng)用Access數(shù)據(jù)庫(kù),HOME,SQL,拓展問(wèn)題,數(shù)據(jù)庫(kù)術(shù)語(yǔ),創(chuàng)建數(shù)據(jù)庫(kù),SQL語(yǔ)句,第9章 訪問(wèn)數(shù)據(jù)庫(kù)9.2 訪問(wèn)數(shù)據(jù)庫(kù),HOME,Connection,連接數(shù)據(jù)庫(kù),Connection對(duì)象,訪問(wèn)數(shù)據(jù)庫(kù),又稱連接對(duì)象,用來(lái)和數(shù)據(jù)庫(kù)建立連接。,Connection對(duì)象介紹,Connection對(duì)象的方法: Open建立Connection對(duì)象和數(shù)據(jù)庫(kù)之間的連接。 Close關(guān)閉Connection對(duì)象和數(shù)據(jù)庫(kù)之間的連接。 Execute執(zhí)行對(duì)數(shù)據(jù)庫(kù)的各種操作。,第9章 訪問(wèn)數(shù)據(jù)庫(kù)9.2 訪問(wèn)數(shù)據(jù)庫(kù),HOME,連接數(shù)據(jù)庫(kù),set conn=ser
6、ver.createobject(ADODB.Connection),conn.provider=Microsoft.jet.oledb.4.0,conn.Open=C:Inetpubwwwrootdb1.mdb,Connection,連接數(shù)據(jù)庫(kù),訪問(wèn)數(shù)據(jù)庫(kù),第9章 訪問(wèn)數(shù)據(jù)庫(kù)9.2 訪問(wèn)數(shù)據(jù)庫(kù),HOME,引入文件共用代碼,Connection,連接數(shù)據(jù)庫(kù),訪問(wèn)數(shù)據(jù)庫(kù), ,one.asp,two.asp,第9章 訪問(wèn)數(shù)據(jù)庫(kù)9.2 訪問(wèn)數(shù)據(jù)庫(kù),HOME,訪問(wèn)數(shù)據(jù)庫(kù),set conn=server.createobject(ADODB.Connection),conn.provider=Microsoft.jet.oledb.4.0,conn.Open=C:Inetpubwwwrootdb1.mdb,StrSql=增/刪/改的SQL語(yǔ)句,conn.Execute strSql,Connection,連接數(shù)據(jù)庫(kù),訪問(wèn)數(shù)據(jù)庫(kù),conn.Close,連接數(shù)據(jù)庫(kù),訪問(wèn)數(shù)據(jù)庫(kù),第9章 訪問(wèn)數(shù)據(jù)庫(kù)9.2 訪問(wèn)數(shù)據(jù)庫(kù),HOME,訪問(wèn)數(shù)據(jù)庫(kù)應(yīng)用,StrSql= Delete From table1 Where 姓名= 周 ,程序中的SQL語(yǔ)句:雙引號(hào)變成單引號(hào),程序中的SQL語(yǔ)句:拼接變量,VaName=周 StrSql=Delete From table1 Where 姓名= &VaName& ,