第八章 DAO/ADO 物件應用和程式設計

Size: px
Start display at page:

Download "第八章 DAO/ADO 物件應用和程式設計"

Transcription

1 3.1 ASP 程式 ASP 程式架構 ASP 語言 ASP 程式開發工具 ASP 指令語法 標記 變數宣告 輸出資料 輸入資料 讀取表單資料 網頁間資料傳遞方法 Server 物件 檔案操作 資料庫處理程式設計 資料庫連線 開啟紀錄集 紀錄操作 輸出資料 查閱資料 - 依鍵值 查閱資料 - 指定紀錄序 刪除資料 - 依鍵值 更新資料 - 依鍵值 郵寄資料 - 一般郵件 將 ASP 程式碼封裝成 DLL 設計要點 引用 DLL 檔 應用範例 29 回目錄 1

2 由於本書並非特別針對網頁設計, 有關網頁之製作方式並不準備深入探討, 本章僅介紹有關 ASP 物件操作資料庫之常用方法與程式設計技巧, 讀者必須具備基礎的 HTML 知識, 方能了解範例程式之意義 讀者若需了解網頁設計技巧, 請參閱其它專書 在閱讀本章時, 可搭配本書提供之 ASP 應用系統, 將能加深讀者之 ASP 程式語法與設計技巧 在 WEB 網際網路環境下, 仍然需要使用 ADO 物件來處理資料庫, 同時需要透過 MyODBC 驅動程式與 MySQL 連線 此外, 本章也介紹以 DLL 方式來設計 ASP 程式之技巧 3.1 ASP 程式 ASP 程式架構 ASP 程式必須架構在網頁程式內, 基本的 ASP 程式架構如圖 3.1 所示 <!-- #include virtual = " 公用程序 " --> <%.. 前置處理 ASP 程序 %> <HTML> <HEAD> </HEAD> <BODY>. 網頁主文 <%.. 展示資料 ASP 程序 %> </BODY> </HTML> <%.. 資料處理 ASP 副程式 %> 圖 3.1ASP 程式架構示意圖其中公用程序 : 它是一個外部獨立檔案, 可供一個以上之網頁程式共同使用之副程式 公用程序之引入方式必須合乎下列語法, 在 <Html> 標記之前 前後以 <!-- #include 及 --> 夾住 以 virtual 或 file 指定程序檔之來源路徑 2

3 程序檔必須是完整檔名及對應路徑前置處理程序 : 用來承接其它網頁傳送之資料 擷取對話變數 (SESSION), 或是處理當下網頁程式之內含表單輸入資料 展示資料程序 : 用來擷取資料庫資料並予以轉換為網頁文稿 副程式 : 支援展示資料 ASP 程序之副程式, 若展示資料 ASP 程序需重覆出現在許多段落時, 可予以抽出並給與一個獨立的副程式名稱 <.>: 以角括符夾住關鍵字之段落為 HTML 網頁文稿 前述各段落之 ASP 程序可視情況予以缺設, 也可以同時都出現 ASP 語言目前可用來執行主控端動態網頁的語言有 Java JavaScript Jscript VBScript 等, 用來執行主控端動態網頁的語言有 PHP JSP ASP 等 ASP 為 Microsoft 的 WEB 伺服器 -IIS 所提供的網頁程式執行環境, 讓使用者可以運用 <% 與 %> 標籤將 Script 撰寫之程式碼嵌入 HTML 文件 ASP 預設支援的 Script 語言有 VBScript 和 Jscript, 本書使用 VBScript 來介紹所有操作資料庫之網頁程式 ASP 程式開發工具由於 ASP 程式是一個純文字檔, 任何文字編輯器, 例如 NotePad, 均可用來撰寫網頁程式 此外,Office 家族成員 -Microsoft Script Editor FrontPage 等, 則為專用的網頁程式編輯器, 本書提供的範例程式都是使用 FrontPage 設計而成 FrontPage 的操作非常簡易, 初學者很容易自行學習, 建議讀者可以使用 FrontPage 來閱讀範例程式 3.2 ASP 指令語法 標記 編輯 ASP 程式碼時, 指令無論置於何處, 指令碼必須以 <% 前導, 以及以 %> 結束, 基本格式如下 : 單行指令 <% ASP 程式碼 %> 多行指令 <% ASP 程式碼 ASP 程式碼 %> 3

4 ASP 程式預設在伺服端執行, 若需指定在主控端處理, 則標記符號必 須改為下列格式 : <Script Language=VBscript> ASP 程式碼 </Script> 變數宣告 ASP 程式變數係採弱型別, 可不經宣告就直接給值 資料型別只有一 種 -Variant, 而 Variant 型別可以儲存數種不同的資料, 包括 Empty Null Boolean Byte Integer Long Single Double Date String Object 及 Error 一個運算式之輸出結果, 其型別取決於運算當時之狀況, 應用系統 會自動轉換至適當型別 變數名稱不得與 VBscript 關鍵字同名 明確宣告 變數宣告方式可採明確宣告, 或採模糊宣告, 指令如下 : Dim A A = 10 模糊宣告 - 直接給值 A = 輸出資料 輸出一般資料 ASP 程式使用 Response 物件之 Write 方法來輸出資料, 常用的指令形式如下 : Response.Write 欲輸出之字串 Response.Write 變數 Response.Write 運算式字串可由一般文字及 HTML 標記組合而成, 而變數或運算式也可以和 HTML 標記組合使用 移轉網頁若需要從工作中之網頁轉移至其它網頁, 可使用下列指令 : Response.Redirect 目的網頁 此道指令必需置於 <HTML> 標記前 中斷網頁輸出若要強制中斷後續資料之輸出, 可使用下列指令 : Response.End 強制輸出緩充區資料 Response.Flush 4

5 輸出網頁資料時, 事前可使用 Response.Buffer = True 指令將資料寫入 緩充區, 此道指令必需置於 <HTML> 標記前 檢查主控端是否正常連線 Response.IsClientConnected 輸出網頁資料時, 可利用此道指令來檢查主控端是否正常連線, 回傳結果為 True 時, 表示主控端仍正常連線 輸入資料 在 ASP 環境下, 資料輸入必須透過內含輸入表單之網頁程式來處理 輸入表單之基本樣式如圖 3.2, 範例程式請參閱本書所附之應用程式 <Body> <Form Action = 擷取表單資料程式 Method=[Post Get] Name= 表單名稱 > [ 輸入項提示文字 ] <Input Type= 控制項型式 Name= 控制項名稱 Value= 預設值 >.. < 其它控制項 > <Input Type=Submit Name= 控制項名稱 Value= 送出 > <Input Type=Reset Name= 控制項名稱 Value= 清除 > </Form> 圖 3.2 輸入表單基本樣式輸入表單之主要構成要素及用途簡述如下, 讀者若要了解各控制項之詳細用法與語法, 請參閱本書之範例程式 <Form> </Form>: 宣告輸出網頁內含輸入表單, 表單則由 Action Method 和 Name 三個基本成員所組成, 此外還有其它資料處理方法 Action: 指定擷取表單資料之處理程式, 此程式可以是原網頁程式, 也可以是另外的 ASP 程式 Method: 指定傳遞輸入表單資料之方法, 可選用 Post 或 Get Name: 指定輸入表單之名稱 Input: 在表單內佈置一個輸入控制項, 可使用 Type 來指定輸入控制項之形式, 可依需要指定下列形式 : Text: 文字方塊 Password: 密碼型文字方塊 Radio: 選擇鈕 Check: 核取方塊 5

6 Hidden: 隱藏型文字方塊 Submit: 將輸入資料傳送出去 ( 表單必備控制項 ) Reset: 將輸入資料清除其它控制項 : 除 Input 型式之控制項外, 尚有下列兩種控制項 : Textarea: 多行文字方塊 Select: 下拉式清單方塊 讀取表單資料擷取資料之指令如下 : 存入變數變數 = Request( 輸入表單控制項名稱 ) 直接置入網頁 <% = Request( 輸入表單控制項名稱 ) %> 擷取表單資料之程式若為原網頁程式, 則擷取指令須置於前置處理段, 若為其它程式則無限制 網頁間資料傳遞方法在資料處理過程, 若需要在不同網頁程式間傳遞資料, 可使用下列三種方式 : Application Session 或 Cookie 物件 以 URL 傳送 使用隱藏式文字方塊 Application 物件適用所有連線在同一虛擬目錄下之不同程式,Session 和 Cookie 物件則適用同一連線在同一虛擬目錄下之不同程式 Application 和 Session 物件係將變數存在伺服端記憶體, 而 Cookie 則儲存在主控端之硬碟 至於變數之生命週期,Application 物件與 WEB 應用程式同進退, Session 物件預設為二十分鐘, 而 Cookie 物件則與瀏覽器同進退 應用範例請參閱本書所附之範例程式 前述物件之應用指令語法說明如下 : 建立物件或重新給值 Application( 變數名稱 ) = 值 Session( 變數名稱 ) = 值 Response.Cookies ( 變數名稱 ) = 值 取用變數值變數 = Application( 變數名稱 ) 變數 = Session( 變數名稱 ) 變數 = Request.Cookies ( 變數名稱 ) 6

7 除了使用上述物件來傳遞資料外, 也可直接透過 URL 來傳送資料, 指令語法如下 : HTML 格式 <A Href= 目的程式? 變數名稱 = 值 > 提示文字 </A> ASP 格式 <% Response.Redirect 目的程式? 變數名稱 = & 變數 %> 若傳遞變數超過一個或以上時, 變數間須以 & 串接, 指令如下 : <A Href= 目的程式? 變數 1 = 1& 變數 2 = 值 2 > 提示文字 </A> 或是 <% Response.Redirect 目的程式? 變數 1 = 值 1& 變數 2 = 值 2 %> 在目的程式則以 Request( 變數 ) 來取得傳遞資料 此外, 也可以使用隱藏型文字方塊來傳遞資料, 應用範例如下 : <INPUT Type=Hidden Value=<% =Page %> Name="_recNO"> Server 物件常用的 Server 物件指令簡述如下 : MapPath: 傳回虛擬目錄範例 1:Server.MapPath( /MySQL/ASP/EasyDoMySQL.mde ) 說明 : 取得虛擬目錄之根目錄, 然後與指定之檔案字串串接在一起 範例 2:Server.MapPath(../ ) 說明 : 取得工作網頁之父目錄 範例 3:Server.MapPath(./ ) 說明 : 取得工作網頁之目錄 ServerVariables: 傳回伺服器對應信息範例 :shownewrec = Request.ServerVariables("PATH_INFO") 說明 : 此指令可取出工作網頁程式名稱及目錄 檔案操作 建立檔案物件指令語法 : Set 檔案系統物件 = Server.CreateObject( Scripting.FileSystemObject ) 建立檔案指令語法 : Set 檔案變數 = 檔案系統物件.CreateTextFile( 檔案及路徑名稱 [, 是否覆寫 [, 檔案格式 ]]) 說明 : 7

8 是否覆寫 : 可傳入 True 或 False, 預設值為 False 檔案格式 : 傳入 True 表 Unicode,False 表 ASCII, 預設值為 True 刪除檔案指令語法 : 檔案系統物件.DeleteFile( 檔案及路徑名稱 [, 移除唯讀檔 ]) 說明 : 移除唯讀檔 : 指定檔案數屬性為唯讀時, 是否仍刪除, 傳入 True 表要刪除,False 表不刪除 檢查檔案是否存在指令語法 : 檔案系統物件.Fileexists( 檔案及路徑名稱 ) 說明 : 傳回 True 表檔案已存在,False 表不存在 開啟檔案指令語法 : Set 檔案變數 = 檔案系統物件.OpenTextFile( 檔案及路徑名稱 [, 輸出入模式 [, 建立新檔 [, 開啟格式 ]]]) 說明 : 輸出入模式 : 傳入 1 表唯讀 ( 預設值 ),2 表唯寫 ( 覆寫舊檔 ),3 表資料加在檔案末尾 建立新檔 : 檔案存在時, 是否覆寫, 傳入 True 表要覆寫, 預設值為 False 開啟格式 : 傳入 1 表 ASCII( 預設值 ), 傳入 -1 表 Unicode, 傳入 -2 表以原格式開啟 檢查檔案結尾指令語法 : 檔案變數.atEndOfStream 說明 : 傳回 True 表已至檔案末尾 讀取指定字元數指令語法 : 檔案變數.Read(N) 說明 : 傳入數值 N 表要讀取之字元數 讀取一行 指令語法 : 檔案變數.ReadLine 8

9 說明 : 從檔案指標處開始, 讀取該行之所有字元 讀取檔案全部字元指令語法 : 檔案變數.ReadAll 說明 : 將整個檔案內容讀出 略過 N 個字元不讀取指令語法 : 檔案變數.Skip(N) 說明 : 傳入數值 N 表要忽略之字元數 略過一行不讀取指令語法 : 檔案變數.SkipLine 說明 : 略過檔案指標處之整行字元 寫入字串指令語法 : 檔案變數.Write( 字串 ) 說明 : 將傳入之字串寫入檔案 寫入一行指令語法 : 檔案變數.WriteLine( 字串 ) 說明 : 將傳入之字串以獨立行形式寫入檔案 3.3 資料庫處理程式 資料庫連線連線指令 : 宣告連線物件 Dim con 產生連線物件 9

10 Set con= Server.CreateObject("ADODB.Connection") MySQL 連線字串 cn_str = "Driver= {MySQL ODBC 3.51 Driver}; Server= 主機 ;User= 帳號 ; Password= 密碼 ;Database=MySQL 資料庫 ; Option= " & Access 連線字串 cn_str = "Provider = Microsoft.Jet.OLEDB.4.0; " cn_str = cn_str & " Data Source=" & Server.MapPath(Access 資料庫 ) & ";Jet OLEDB:Database Password= 密碼 " con.connectionstring = cn_str con.open 說明 1: 連線時需使用 Server 物件之 CreateObject 方法來建立連線物件 說明 2: 欲連線之主機 資料庫及登入帳號和密碼, 可以使用專用登入表單來取得, 然後將它們存入 SESSION 物件內備用 當要連線時, 即可從 SESSION 物件取出, 再將它們組合在連線字串內 開啟紀錄集 指令語法 : Dim adrs Set con = opencon( 連線資料庫 ) Set adrs = Server.CreateObject("ADODB.Recordset") adrs.open SQL 指令集, con, 3, 2 說明 : 連線時需使用 Server 物件之 CreateObject 方法來建立紀錄集物件 紀錄操作 MySQL 資料庫在 ASP 環境下, 紀錄之操作方式均需使用 ADO 物件及方法, 使用方法除下述幾點不同外, 其餘都與 Access 應用環境大同小異 無法離線作業 使用 Update 方法來更新紀錄 無法使用 RecordCount 方法來取得紀錄筆數, 請改用下例程式計算紀錄筆數 : str = Select count(*) From 資料表 Where 過濾條件 adrs.open str, con, 3, 2 取出紀錄總數 n = adrs(0) 關閉物件 10

11 adrs.close Set adrs = Nothing Access 資料庫在 ASP 環境下,Access 資料庫之紀錄操作方法完全與 Access 應用環境相同 輸出資料 將資料表紀錄輸出成網頁, 處理方式如下述程序 : 純文字形式 - 一次送出全部紀錄 1. 前置處理 宣告物件 ( 必須宣告 ) Dim con Dim rs1 If Session("strSQL") = Empty Then Response.Write " 無 SQL 指令!" Response.End 取出工作資料庫 WKDB = Session("WKDB") 取出來原資料 SQL strsql=session("strsql") 開啟紀錄集 Set rs1=openrs(wkdb, strsql,1) 釋放握濾條件 rs1.filter = "" 取出資料表名 ( 副程式 ) tbl = gettable(strsql, "NOJ" ) 計算紀錄總數 ( 副程式 ) trec = getrecno(rs1,1) 設定啟始紀錄序 intpage=1 2. 送出製作表格指令 Response.Write "<CENTER><TABLE BORDER=1 cellspacing = 0 cellpadding = 0 >" 3. 填入欄位抬頭 For i=0 to adrs.fields.count-1 11

12 Response.WRITE "<TD> <FONT Size=2 > " & adrs(i).name & "</FONT></TD>" Response.Write "</TR>" 4. 輸出紀錄 odd = True 用於標示間格列之題示顏色 Do While Not adfrs.eof 以下程式處理相臨紀錄以不同顏色顯示 If odd = True Then Response.Write "<TR bgcolor=white>" Else Response.Write "<TR bgcolor=lightgreen>" End if 以下程式送出每一筆紀錄 For i=0 To adrs.fields.count -1 Response.WRITE "<TD align=right> <FONT "</FONT></TD>" Response.Write "</TR>" odd = Not odd 變換顏色 adrs.move 移至次筆 Loop Size=2 > " & adrs(i) & 5. 完成表格製作 Response.Write "</TABLE></CENTER>" 純文字形式 - 一次送出一頁 1. 前置處理 : 與輸出全部紀錄類似 2. 提示要輸出資料之頁次按鈕 <% shownewrec = Request.ServerVariables("PATH_INFO") %> 取得當下之網址及工作網頁名稱 <FORM Action=<%=showNewRec%> Method=GET> 點取頁次後, 以指定之網頁來展示資料 <table><tr> <td> <Font Color="#0000FF">[<%=tbl%>] 紀錄瀏覽 </Font> </td> 12

13 如果不是位於第一頁 <%If Page <> 1 Then %> <td> <A HREF=<%=showNewRec%>?Page=1><FONT Size=3 > 首頁 </FONT></A> </td> <td> <A HREF=<%=showNewRec%>?Page=<%=(Page-1)%>><FONT Size=3 > 前頁 </FONT></A> </td> <% 如果不是位於最後一頁 If Page <> tpage Then %> <td> <A HREF=<%=showNewRec%>?Page=<%=(Page+1)%>><FONT Size=3 > 次頁 </FONT></A> </td> <td> <A HREF=<%=showNewRec%>?Page=<%=tPage%>><FONT Size=3 > 末頁 </FONT></A> </td> <%%> <td> <A HREF=<%=showNewRec%>?Page=0><FONT Size=3 > 全部 </FONT></A> </td> <td> <FONT Size=3 > 輸入頁次 :</FONT> </td> <td> <INPUT TYPE=TEXT Name=Page SIZE=3> </td> <td> <FONT Size=3 > 頁次 :</FONT> <FONT COLOR ="Red"> <% =Page%>/<%=tPage%></FONT> </td> </tr> </table> </FORM> 3. 移動紀錄指標至目的頁次的第一筆 取出每頁筆數預設值 pgrec = Session("PageSize") 目的頁次大於 0 時 If intpage > 0 Then adrs.move (intpage - 1) * pgrec Else 目的頁次小於 0 則強制移至首頁 If Not adrs.eof Then adrs.move 0 4. 送出製作表格指令 Response.Write "<CENTER><TABLE BORDER=1 cellspacing = 0 cellpadding = 0 >" 13

14 5. 填入欄位抬頭 For i=0 to adrs.fields.count-1 Response.WRITE "<TD> <FONT Size=2 > " & adrs(i).name & "</FONT></TD>" Response.Write "</TR>" 6. 輸出紀錄 odd = True For j = 1 to pgrec If frs.eof then Exit For end if 相臨紀錄以不同顏色顯示 If odd = True Then Response.Write "<TR bgcolor=white>" Else Response.Write "<TR bgcolor=lightgreen>" End if 以下程式送出每一筆紀錄 For i=0 To adrs.fields.count -1 Response.WRITE "<TD align=right> <FONT "</FONT></TD>" Response.Write "</TR>" odd = Not odd 變換顏色 adrs.move 移至次筆 Size=2 > " & adrs(i) & 7. 完成表格製作 Response.Write "</TABLE></CENTER>" 輸入表單形式 - 一次送出一筆 1. 前置處理 : 與輸出全部紀錄類似 2. 製作輸入表單及輸出資料 <Table> <TABLE BORDER=1 cellspacing = 0 cellpadding = 0> 搭配表格型式製作表單 <td> <FORM Action = updata.asp Method=Post name=form2> 14

15 製作表單,upData.asp 為新增資料處理程式 <CENTER> <font color="#0000ff">[<%=ftbl%>] </font> ftbl: 資料表名稱 以隱藏型文字方塊記錄當下之紀錄指標 <INPUT Type=Hidden Value=<%=Page%> Name="_recNO"> </td> <% If not adrs.eof then adrs.move Page fld=adrs.fields.count-1 vl = "" 逐列提示每個欄位抬頭 製作輸入方塊及提示資料 For i= 0 To fld Response.Write "<TR Height =15>" Response.Write "<TD bgcolor=lightblue> <FONT Size=2 >" & adrs(i).name & "</FONT></TD>" If Not rs1.eof Then vl = rs1(i) Btn = "<INPUT Type=Text Value='" & vl & "' Name =" & adrs(i).name & " Size =" & setcolwidth(adrs, i, 2 ) & ">" setcolwidth(adrs, i, 2 ) 為計算欄位寬度副程式 Response.Write "<TD> <FONT Size=2 >" & Btn & "</FONT></TD>" Response.Write "</TR>" %> <TR align = center> <% Btn = "<INPUT Type=Submit Value="" 更新 "" Name=Upd>" Response.Write "<TD bgcolor=red>" & Btn & "</TD>" %> 以下程式製作下拉型資料處理方式 <TD> 更新方式 <select name =_mdtype size=1> <option value ="Mod" selected> 修改 </option> <option value ="Del" > 刪除 </option> <option value ="Add" > 新增 </option> </select></td></tr> </FORM> </TABLE></CENTER> 15

16 3. 提示移動紀錄按鈕 <FORM Action=<%=showNewRec%> Method=GET name=form1> 如果不是位於第一筆 <%If Page <> 0 Then%> <A HREF=<%=showNewRec%>?Page=0> 首筆 </A> <A HREF=<%=showNewRec%>?Page=<%=(Page-1)%>> 前筆 </A> <% 如果不是位於最後一筆 If Page <> trec Then %> <A HREF=<%=showNewRec%>?Page=<%=(Page+1)%>> 次筆 </A> <A HREF=<%=showNewRec%>?Page=<%=(tREC-1)%>> 末筆 </A> <%%> 輸入紀錄序 :<INPUT TYPE=TEXT Name=Page SIZE=3> 紀錄序 :<FONT COLOR="Red"><%=(Page)%>/<%=(tREC-1)%></FONT> </FORM> 4. 新增紀錄 ( 取至 updata.asp 片段程式 ) 製作 SQL 指令 strsql = Insert Into & Session( TBL1 ) & ( 以下程式用於截取欄名 For i =0 To adrs.fields.count-1 strsql = strsql & adrs(i).name If i < adrs.fields.count-1 Then strsql = strsql &, strsql = strsql & ) Value ( 以下程式用於截取欄值 For i =0 To adrs.fields.count-1 na = adrs(i).name 取出輸入表單欄位資料 vl =Request(na) If isvalue(adrs(i).type) Then isvalue(): 檢查欄位型態副程式 strsql = strsql & vl Else strsql = strsql & & vl & If i < adrs.fields.count-1 Then strsql = strsql &, 16

17 strsql = strsql & ); 資料寫回資料庫 con.execute strsql 查閱資料 - 依鍵值 設計技巧簡述如下 : 1. 前置處理 : 開啟紀錄集, 取出鍵值欄 2. 製作鍵值輸入表單 3. 輸入鍵值, 點取傳送按鈕, 將表單資料傳送給當下網頁 4. 取出鍵值並過濾資料 kstr= na = Request(KFL1) 取出第一個鍵值方塊資料 If Not na = Empty Then If isvalue(rs1(kfl1).type) Or isbool(rs1(kfl1).type) Then isvalue isbool 及 isdate 為筆者自行撰寫之函數組合過濾條件 kstr = KFL1 & " =" & na Else If isdate(rs1(kfl1).type) Then kstr = KFL1 & " =#" & na & "#" Else If KFL2 = Empty Then kstr = KFL1 & " Like '" & na & "%'" ' 允許類似查詢 Else kstr = KFL1 & " = '" & na & "'" 若有第二鍵值欄, 則取出第二鍵值 If Session("KFL2") <> Empty Then na=request(kfl2) If Not na = Empty Then If isvalue(rs1(kfl2).type) Or isbool(rs1(kfl2).type) Then kstr = kstr & " And " & KFL2 & " =" & na 17

18 Else If isdate(rs1(kfl2).type) Then kstr = kstr & " And " & KFL2 & " =#" & na & "#" Else kstr = kstr & " And " & KFL2 & " = '" & na & "'" 將雙引號改為單引號 kstr =Replace(kstr, Chr(34), "'") 取消前次過濾條件 adrs.filter = "" 過濾資料 If kstr <> "" Then adrs.filter = kstr 5. 輸出合乎鍵值之全部資料 查閱資料 - 指定紀錄序設計技巧簡述如下 : 1. 設定 SQL 指令 :Select 欄位串列 From 資料表 Where 過濾條件 Limit fn, rn, 其中 fn: 起始紀錄序 ( 紀錄序從 0 起算 ), rn: 取出紀錄筆數 2. 其餘設計技巧與依鍵值查閱紀錄相同 刪除資料 - 依鍵值設計技巧簡述如下 : 1. 前置處理 : 開啟紀錄集, 取出鍵值欄 2. 製作鍵值輸入表單 3. 輸入鍵值, 點取傳送按鈕, 將表單資料傳送給當下網頁 4. 取出鍵值並過濾資料 5. 將合乎鍵值之全部資料刪除, 若有關聯資料表, 將先刪除子表資料, 然後刪除主表資料 刪除指令如下 : dstr = "Delete From " & 資料表名 & " Where " & kstr con.execute dstr 18

19 3.3.8 更新資料 - 依鍵值 設計技巧簡述如下 : 1. 前置處理 : 開啟紀錄集 2. 製作鍵值欄及修改欄選擇表單 範例程式如下 : <Form action = 更新資料程式.asp method = post name = "Form1"> <input type = hidden name=wktype value=<%=wktype%>> <table border=1><tr align=center bgcolor=yellow></font><td> 比對欄位 </td><td> 更新欄位 </td></tr> <tr> <% 以下程式設定比對欄位 For fi =0 To 1 Response.Write "<td> <table border=1> <tr bgcolor =lightblue><td> 欄名 </td><td > 別名 </td><td > 選取 </td></tr>" odd= True For i =0 To adrs.fields.count-1 If fi =0 Then fna = "K_" & adrs(i).name Else fna = adrs(i).name If odd =True Then Response.Write "<tr bgcolor=lightgreen>" Else Response.Write "<tr bgcolor =white>" 以核取方塊製作表單 Btn = "<td>" & adrs(i).name & "</td><td>" & fna & "</td><td><input Type = Checkbox Name =" & fna & "></td></tr>" Response.Write Btn odd = Not odd Response.Write "</table></td>" %> </tr> 19

20 <tr align =center><td><input Type =submit Value = 確認 name = submit></td> <TD><Input Type =Reset Value = 重設 name = reset></td></tr> </Table> </form></center> 3. 選取鍵值欄及修改欄 ( 可複選 ), 點取傳送按鈕, 將選取資料傳送給更 新資料程式 取出比對鍵值欄位 upkfld = "" 逐欄比對是否被選取為鍵值欄 For i = 0 To adrs.fields.count-1 na= "K_" & adrs(i).name If Request(na) <> Empty Then If upkfld = "" Then upkfld = adrs(i).name Else upkfld = upkfld & ", " & adrs(i).name 設定修改欄位 upfld = "" 逐欄比對是否被選取為修改欄 For i = 0 To adrs.fields.count-1 na= adrs(i).name If Request(na) <> Empty Then If upfld = "" Then upfld = adrs(i).name Else upfld = upfld & ", " &adrs(i).name 將選定欄位記錄在 Session 物件 If upfld <> "" Then Session("UPKFLD") = upkfld Session("UPFLD") = upfld 20

21 將工作網頁轉至修改資料表單網頁 Response.Redirect "updabykey.asp?wktype=" & wktype 4. 製作修改資料表單 <FORM Action= 更新資料程式.asp Method=Post name = Form2> <Center> 以下程式以隱藏型文字方塊儲存欄位設定資料 <INPUT Type=Hidden Value=<%=wkType%> Name="wkType"> <INPUT Type=Hidden Value=<%=upkFld%> Name="upkfld"> <INPUT Type=Hidden Value=<%=upFld%> Name="upfld"> <TABLE BORDER=1 cellspacing = 0 cellpadding = 0> <% If wktype = "Key" Or wktype = "All" Then fld=adrs.fields.count-1 Response.Write "<TR Height =15> <TD bgcolor=lightblue><font Size=2 > 鍵值 </FONT></TD>" 提示鍵值欄抬頭 If upkfld <> Empty Then For ki =0 To UBound(kfld) kfld 鍵值欄位串列 na = Trim(Lcase(kfld(ki))) For i= 0 To fld If Lcase(adRs (i).name) = na Then Response.Write "<TD bgcolor=lightblue> <FONT Size=2 >" & adrs (i).name & "</FONT></TD>" </TR>" Response.Write "<TR Height =15 bgcolor=lightblue> <TD bgcolor=lightblue><font Size=2 > 設定 </FONT></TD>" 製作輸入方塊 If upkfld <> Empty Then For ki =0 To UBound(kfld) 21

22 na = Trim(Lcase(kfld(ki))) 以下程式以文字方塊製作鍵值欄位 For i =0 to fld If Lcase(adRs(i).Name) = na Then Response.Write "<TD><Input Type =Text Name =K_" & na & " Size =" & setcolwidth(adrs, i, 2 ) & "></Td>" Btn = "<TD bgcolor=lightblue><select Name =Kall Size =1><Option Value=No Selected> No</Option>" Btn =Btn & "<Option Value=Yes> Yes </Option> </Select></TD></TR></Table><Table border=1>" Response.Write Btn Response.Write "<TR Height =15 bgcolor=lightblue><td> 更新 </td>" For ki =0 To UBound(ufld) ufld 修改欄位串列 na = Trim(Lcase(ufld(ki))) 提示修改欄位 For i= 0 To fld If Lcase(adRs(i).Name) = na Then Response.Write "<TD > <FONT Size=2 >" & adrs(i).name & "</FONT></TD>" Response.Write "<TR bgcolor=lightblue><td bgcolor =red><input Type = submit Name =Upd Value = 執行 ></td>" For ki =0 To UBound(ufld) na =Trim( Lcase(ufld(ki))) 以下程式以文字方塊製作修改欄位 For i =0 to fld If Lcase(adRs(i).Name) = na Then Response.Write "<TD><Input Type =Text Name =" & na & " Size =" & setcolwidth(adrs, i, 2 ) & "></Td>" 22

23 Response.Write "</TR></Table>" %> </FORM> 4. 輸入鍵值及修改資料 5. 按下確認按鈕, 取出鍵值及修改資料, 然後將合乎鍵值之資料予以修改, 程式範例如下 : excsql = "" If wktype = "Key" Or wktype = "All" Then 組合修改 SQL 指令 excsql = "Update " & tbl & " Set " 逐欄取出修改資料 For ki =0 To Ubound(ufld) na= Trim(ufld(ki)) vl = Request(na) If ki > 0 Then excsql = excsql & ", " If isvalue(rs1(na).type) Or isbool(rs1(na).type) Then excsql = excsql & na & " = " & vl Else If isdate(rs1(na).type) Then excsql = excsql & na & " = #" & vl & "#" Else If vl=empty Then vl =Null ' 空字串原資料欄可不輸入資料 excsql = excsql & na & " = '" & vl & "'" If kstr <> "" Then 加入過濾條件 excsql = excsql & " Where " & kstr 修改資料 con.execute excsql 23

24 3.3.9 郵寄資料 - 一般郵件 設計技巧簡述如下 : 1. 前置處理 : 取出寄信伺服器及寄件人 If Request.Cookies("mlServer") <> Empty Then mlserver = Request.Cookies("mlServer") If Request.Cookies("mlFrom") <> Empty Then mlfrom = Request.Cookies("mlFrom") 2. 製作郵件輸入表單 <form method="post" action="sendmlsub.asp?wktype=<% =wktype %>"> <input type="hidden" name="wktype" value=<% =wktype%>> <table> <% If wktype="slf" Then %> <tr><td><font size="2"> 收件人 </font> <input type="text" size="80" name="mlto"></td></tr> <tr><td><font size="2"> 副本 </font> <input type="text" size="82" name="mlcc"></td></tr> <% %> <% If wktype ="Bat" Then %> <tr><td><font size="2"> 群組名稱 </font> <input type="text" size="80" name="mlto"></td></tr> <% %> <tr><td><font size="2"> 寄信伺服器 </font> <input type="text" size="77" name="mlserver" Value=<% =mlserver%>></td></tr> <tr><td><font size="2"> 寄件人 </font> <input type="text" size="80" name="mlfrom" value= <% =mlfrom%> ></td></tr> <tr><td><font size="2"> 主旨 </font> <input type="text" name="subject" size="82"></td> </tr> </table> <table> <tr><td valign=top><font size="2"> 本文 </font></td><td><textarea rows="12" name="mlmsg" cols="80"></textarea></td></tr> </table> <table><tr><td><font size="2"> 附件 1</font><input type="file" name="file1" size="30"></td> <td><font size="2">2</font><input type="file" name="file2" size="30"></td> 24

25 </tr></table> <table><tr> <td><input type="submit" value=" 傳送 " name="b1"></td> <td><input type="reset" value=" 重新設定 " name="b2"></td></tr> </table> </form> 3. 輸入郵件資料, 點取傳送鈕, 啟動寄信程式 4. 取出郵件資料 mlserver = Request("mlServer") mlfrom = Request("mlFrom") Response.Cookies("mlServer") = mlserver Response.Cookies("mlFrom") = mlfrom mlsendusing = 2 ath1 ="" ath2="" mlto = Request("mlTo") mlcc = Request("mlCc") If Instr(mlTo, "@") =0 Then mlbytbl=1 If mlcc <> "" Then mlto = mlto & ", " & mlcc Subject = Request("Subject") mlmsg = Request("mlMsg") 5. 設定郵件伺服器屬性 建立郵遞物件 Set conf = Server.CreateObject("CDO.Configuration") 建立郵件欄位 Set Flds = conf.fields 設定郵件欄位及屬性 Flds.Item(" = mlserver Flds.Item(" = mlsendusing Flds.Item(" ntimeout") = 10 Flds.Update 25

26 建立郵件信息物件 Set msg = Server.CreateObject("CDO.Message") 郵件信息物件加入郵遞物件 Set msg.configuration = conf 設定信息物件屬性 msg.from = mlfrom msg.subject = Subject msg.textbody = mlmsg ath1 ="" ath2 ="" 取出附加檔 1 ath1 =Request("File1") 取出附加檔 2 ath2 =Request("File2") 設定收信人 msg.to = mlto 加入附加檔 1 及 / 或附加檔 2 If ath1 <>"" Then msg.addattachment ath1 If ath2 <>"" Then msg.addattachment ath2 5. 傳送郵件 msg.send 註 : 若要傳送資料表內含紀錄, 事前可將資料表匯出為文字檔, 然後以附加檔傳送 3.4 將 ASP 程式碼封裝成 DLL 由於 ASP 程式不論是在伺服端或主控端執行, 都是以明碼之 Script 格式呈現, 惡意聯網人員可以輕易得知原始程式, 因而遭受到無謂之入侵和破壞 為提高程式之隱密性和安全性, 可將 ASP 程式封裝成 DLL 格式 設計要點以下詳細介紹 DLL 之製作程序與技巧 1. 啟動 VB 應用程式 26

27 2. 點選應用系統格式 -Active DLL 3. 開啟系統設計介面 系統自動產生一個名稱為 Class1 之類別模組, 專案名稱預設為 Project1, 可將 Class1 和 Project1 改名為適當名稱 4. 點取主功能表 Project 之 References 子功能, 開啟物件參照選單, 請 選入下列物件 : Microsoft Active Server Pages Object Library Microsoft Active Data Objects 2.8 Library Microsoft ADO Ext. 2.8 for DLL & Security Microsoft Active Server Pages ObjectContext Object Library COM+ Services TypeLibrary 5. 在 Class1 開頭加入下列指令 : Public ObjectContext As ObjectContext Public Application As ASPTypeLibrary.Application Public Server As ASPTypeLibrary.Server Public Session As ASPTypeLibrary.Session Public Response As ASPTypeLibrary.Response Public Request As ASPTypeLibrary.Request 註 : 以上變數為 ASP 程式與 DLL 程式溝通之介面 6. 在 Class1 加入下列兩個事件程序 : 啟動 DLL 程式時, 執行前置處理程序 Private Sub Class_Initialize() On Error Resume Set objcontext = GetObjectContext Set Application = objcontext.item("application") Set Server = objcontext.item("server") Set Session = objcontext.item("session") Set Request = objcontext.item("request") Set Response = objcontext.item("response") 此處可加入其它自定程式碼 End Sub 結束 DLL 程式時, 清除系統變數 Private Sub Class_Terminate() On Error Resume 此處可加入其它自定程式碼 Set Application = Nothing 27

28 Set Server = Nothing Set Session = Nothing Set Request = Nothing Set Response = Nothing Set objcontext = Nothing End Sub 7. 在類別內加入屬性欄位, 做為 ASP 與 DLL 存取資料之溝通欄位 讀取資料欄 : Public Property Get 欄位名稱 () As 資料型態欄位名稱 = 系統變數 End Property 寫入資料欄 : Public Property Let 欄位名稱 (ByVal 接收變數 As 資料型態 ) 系統變數 = 接收變數 End Property 8. 若有需要, 可依步驟 6 與 7 加入其它類別 9. 存檔 10. 點取主功能表 File 之 Make *.dll 功能, 將專案編譯成 DLL 檔 11. 將 DLL 檔註冊 : 點取桌面之 開始 執行, 在輸入方塊內輸入左列指令 :regsvr32 DLL 檔所在目錄及檔名, 例如, Regsvr32 D:\Mysql\ASP\AspDoMysql.dll 引用 DLL 檔 在原 ASP 程式, 將原來以 <% %> 之程式碼移除, 改以下列指令取代 : <% Dim AspObj Set AspObj = Server.CreateObject( AspDoMysql.Class1 ) 其中 AspDoMysql 為自行開發之 DLL 檔,Class1 為類別名稱 傳入預設參數給 DLL 檔 AspObj. 欄位名稱 = 傳入值 執行 DLL 檔內之特定程序 AspObj. 程序名稱傳入參數 28

29 取回 DLL 檔處理結果 變數 = AspObj. 欄位名稱 清除物件及收回記憶體 Set AspObj = Nothing %> 應用範例 在此以顯示 Customer 資料表內容為例, 分別展示以 ASP 程式碼與 DLL 指令之異同處 原來 ASP 使用之程式碼連線 Dim Con Dim Rs Set Con= Server.CreateObject("ADODB.Connection") cn_str = "Driver={MySQL ODBC 3.51 Driver}; Server= 主機位址 ;" &_ "User= 用戶帳號 ; Password= 連線密碼 ;" Database= 連線資料庫 ; & _ Option= 16437" Con.ConnectionString = cn_str Con.Open 設定 SQL 指令 Sql = Select * From Customer 開啟紀錄集 Set Rs= Server.CreateObject("ADODB.Recordset") Rs.Open Sql, Con, 3, 2 Response.Write "<CENTER><TABLE BORDER=1 cellspacing = 0 cellpadding = 0 >" Response.Write "<TR BGCOLOR=#00FFFF>" fld = Rs.Fields.Count-1 提示欄位抬頭 For i=0 to fld Response.WRITE "<TD><FONT Size=2 > " &Rs(i).Name & "</FONT> </TD>" 29

30 Response.Write "</TR>" 提示紀錄 Do While Not Rs.EOF Response.Write "<TR>" For i=0 to fld Response.WRITE "<TD><FONT Size=2 > " & Rs(i) & "</FONT></TD>" Response.Write "</TR>" Rs.Move Loop Response.Write "</TABLE></CENTER>" 改用 DLL 之程式檔 在 DLL 之類別開頭宣告五個公用變數 Public m_host As String Public m_wkdb As String Public m_user As String Public m_pswd As String Public m_sql As String 在 DLL 之類別內加入五個資料存取欄位 Public Property Let HOST(ByVal str AsString) M_HOST=str End Property Public Property Let WKDB(ByVal str AsString) M_WKDB=str End Property Public Property Let USER(ByVal str AsString) M_USER=str End Property Public Property Let PSWD(ByVal str AsString) M_PSWD=str End Property Public Property Let SQL(ByVal str AsString) M_SQL=str End Property 30

31 在 DLL 類別內加入一個展示資料程序 showdata Private Sub showdata() On Error Resume Dim Con AS New ADODB>Connection Dim Rs New ADODB.Recordset cn_str = Driver={MySQL ODBC 3.51 Driver}; Server= & m_host & ;User= & m_user & ; Password= & m_pswd & ; Database= & m_wkdb & ;Option= Con.ConnectionString = cn_str Con.Open Rs.Open m_sql, Con, 3, 2 Response.Write <CENTER><TABLE BORDER=1 cellspacing = 0 cellpadding = 0 > Response.Write <TR BGCOLOR=#00FFFF> fld = Rs.Fields.Count-1 以下程式用於提示欄位抬頭 For i=0 to fld Response.WRITE <TD><FONT Size=2 > &Rs(i).Name & </FONT> </TD> Response.Write </TR> 以下程式用於輸出資料 Do While Not Rs.EOF Response.Write <TR> For i=0 to fld Response.WRITE <TD><FONT Size=2 > & Rs(i) & </FONT></TD> Response.Write </TR> Rs.Move Loop Response.Write </TABLE></CENTER> Rs.Close Set Rs = Nothing Con.Close Set Con = Nothing 31

32 End Sub 接著將編輯內容存檔, 然後重製 DLL 檔 ( 但不需要重新註冊 ) 將原 ASP 程式改為下列程式碼 : <% Set AspObj = Server.CreateObject( AspDoMysql.Class1 ) 傳入引數至 DLL AspObj.HOST = LocalHost AspObj.WKDB = 資料庫 AspObj.USER = 用戶帳號 AspObj.PSWD = 密碼 AspObj.SQL = Select * From Customer 叫用 DLL 方法 AspObj.showData // 此程序即可以網頁形式展示紀錄 釋放宣告物件 Set AspObj = Nothing %> 大功告成! 是不是覺得很簡單 請試試你的 DLL 執行結果 DLL 之能力不只如此而已, 請好好發揮你的創意吧! 32

33 3.5 輸入表單控制項使用說明 文字輸入方塊 語法 :<Input Type= "Text" Size = "20" Name = "Comapny" Value = " 國立聯 合大學 "> 密碼輸入方塊 語法 :<Input Type= "PassWord" Size = "8" Name = "PassWord" > 多行文字輸入方塊 語法 :<TextArea Name = "Memo" Rows = "6" Cols = "40"> 文字輸入區 < /TextArea > 下拉式輸入方塊 語法 :<Select Name = "Memo" Size = "1"> <Option> 選項值 1< /Option > <Option> 選項值 2< /Option > <Option> 選項值 3< /Option > <Option> 選項值 n< /Option > </Select> 多重選擇式下拉輸入方塊 語法 :<Select Name = "Memo" Size = "1" Multiple> <Option> 選項值 1< /Option > <Option> 選項值 2< /Option > <Option> 選項值 3< /Option > <Option> 選項值 n< /Option > </Select> 當選取多個選項值時, 可使用下列程式切割各個項目 : City = Request( City ) Cities = Split(City,, ) For i =0 To Ubound(Cities) // 使用 Cities(i) 取出分項植 33

34 3.5.6 核取方塊語法 :<Input Type= "CheckBoxt" Name = "Start" Value = "On"> 當核取此欄時, 傳回值為 "On", 否則為空字串 多選一選擇鈕語法 :<Input Type= "Radio" Name = "Blood" Value = "A" Checked>A 應用範例 : <Input Type= "Radio" Name = "Blood" Value = "A" Checked>A <Input Type= "Radio" Name = "Blood" Value = "B">B <Input Type= "Radio" Name = "Blood" Value = "AB">AB <Input Type= "Radio" Name = "Blood" Value = "O">O<P> 34

RUN_PC連載_10_.doc

RUN_PC連載_10_.doc PowerBuilder 8 (10) Jaguar CTS ASP Jaguar CTS PowerDynamo Jaguar CTS Microsoft ASP (Active Server Pages) ASP Jaguar CTS ASP Jaguar CTS ASP Jaguar CTS ASP Jaguar CTS ASP Jaguar CTS ASP Jaguar Server ASP

More information

Microsoft PowerPoint - P766Ch09.ppt

Microsoft PowerPoint - P766Ch09.ppt PHP5&MySQL 程式設計 第 9 章在網頁之間傳遞資訊 9-1 蒐集網頁上的資訊 9-1-1 建立表單一 決定要蒐集的資訊二 建立表單三 撰寫表單處理程式 單行文字方塊 多行文字方塊 選擇鈕 核取方塊 下拉式功能表 按鈕 密碼欄位 ... 標籤 ACCEPT-CHARSET="... CHARSET="... ACCEPT="... ACTION="URL URL"

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション Perl CGI 1 Perl CGI 2 Perl CGI 3 Perl CGI 4 1. 2. 1. #!/usr/local/bin/perl 2. print "Content-type: text/html n n"; 3. print " n"; 4. print " n"; 3. 4.

More information

6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM

6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM CHAPTER 6 SQL SQL SQL 6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM 3. 1986 10 ANSI SQL ANSI X3. 135-1986

More information

一 個 SQL Injection 實 例 的 啟 示 頁 2 / 6 因 此, 在 知 名 網 站 上 看 到 SQL Injection, 讓 人 驚 心, 卻 不 意 外 網 站 專 案 外 包 是 目 前 業 界 的 常 態, 而 在 價 格 取 勝 的 制 度 下, 低 價 得 標 的 S

一 個 SQL Injection 實 例 的 啟 示 頁 2 / 6 因 此, 在 知 名 網 站 上 看 到 SQL Injection, 讓 人 驚 心, 卻 不 意 外 網 站 專 案 外 包 是 目 前 業 界 的 常 態, 而 在 價 格 取 勝 的 制 度 下, 低 價 得 標 的 S 一 個 SQL Injection 實 例 的 啟 示 頁 1 / 6 你 的 網 站 在 裸 奔 嗎? 一 個 SQL Injection 實 例 的 啟 示 作 者 : 李 明 儒 SQL Injection( 資 料 隱 碼 攻 擊 ) 問 題 早 就 不 是 什 麼 新 聞, 但 前 陣 子 在 一 個 頗 具 知 名 度 的 活 動 網 站 上, 赫 然 發 現 它 大 刺 刺 地 現 身!

More information

VB控件教程大全

VB控件教程大全 Datagrid DataGrid1.Columns.Remove(0) ' 0 DataGrid1.Columns.Add(0).Caption= ' DataGrod1.Columns(0).DataField= Name ' Adodc1.Refresh DataGrid BackColor Font DataGrid CellPadding HTML CellSpacing HTML Width

More information

untitled

untitled 1 .NET sln csproj dll cs aspx 說 料 料 利 來 料 ( 來 ) 利 [] [] 來 說 切 切 理 [] [ ] 來 說 拉 類 類 [] [ ] 列 連 Web 行流 來 了 不 不 不 流 立 行 Page 類 Load 理 Click 滑 料 Response 列 料 Response HttpResponse 類 Write 料 Redirect URL Response.Write("!!

More information

A-1 HTML A-1-1 HTML 1 HTML JSP HTML HTML HTML JSP A HTML HTML HTML HTML HTML HTML HTML HTML.htm.html HTML Windows NotePad HTML IE [ / ] NotePad A-2

A-1 HTML A-1-1 HTML 1 HTML JSP HTML HTML HTML JSP A HTML HTML HTML HTML HTML HTML HTML HTML.htm.html HTML Windows NotePad HTML IE [ / ] NotePad A-2 HTML A-1 HTML A-2 A-2 HTML A-8 A-3 A-14 A-4 A-26 A-5 A-30 A-6 A-42 A-1 HTML A-1-1 HTML 1 HTML JSP HTML HTML HTML JSP A HTML HTML HTML HTML HTML HTML HTML HTML.htm.html HTML Windows NotePad HTML IE [ /

More information

3 Driver do Microsoft Access (*.mdb) hisdata IFIX 1.4

3 Driver do Microsoft Access (*.mdb) hisdata IFIX 1.4 IFix3.5 ACCESS ACCESS hisdata D:\Dynamics\SampleSystem\HistoricalData ODBC DSN hisdata 1 ODBC 1.1 2 1.2 3 Driver do Microsoft Access (*.mdb) 1.3 4 hisdata IFIX 1.4 1.4 5 Access 1.5 6 ODBC ifix3.5 1.6 1.6

More information

p.2 1 <HTML> 2 3 <HEAD> 4 <TITLE> </TITLE> 5 </HEAD> 6 7 <BODY> 8 <H3><B> </B></H3> 9 <H4><I> </I></H4> 10 </BODY> </HTML> 1. HTML 1. 2.

p.2 1 <HTML> 2 3 <HEAD> 4 <TITLE> </TITLE> 5 </HEAD> 6 7 <BODY> 8 <H3><B> </B></H3> 9 <H4><I> </I></H4> 10 </BODY> </HTML> 1. HTML 1. 2. 2005-06 p.1 HTML HyperText Mark-up Language 1. HTML Logo, Pascal, C++, Java HTML 2. HTML (tag) 3. HTML 4. HTML 1. HTML 2. 3. FTP HTML HTML html 1. html html html cutehtmleasyhtml 2. wyswyg (What you see

More information

投影片 1

投影片 1 資料庫管理程式 ( 補充教材 -Part2) 使用 ADO.NET 連結資料庫 ( 自行撰寫程式碼 以實現新增 刪除 修改等功能 ) Private Sub InsertButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles InsertButton.Click ' 宣告相關的 Connection

More information

IsPostBack 2

IsPostBack 2 5 IsPostBack 2 TextBox 3 TextBox TextBox 4 TextBox TextBox 1 2 5 TextBox Columns MaxLength ReadOnly Rows Text TextMode TextMode MultiLine TextMode MultiLine True False TextMode MultiLine Password MulitLine

More information

RunPC2_.doc

RunPC2_.doc PowerBuilder 8 (5) PowerBuilder Client/Server Jaguar Server Jaguar Server Connection Cache Thin Client Internet Connection Pooling EAServer Connection Cache Connection Cache Connection Cache Connection

More information

Microsoft PowerPoint - ch07_1.ppt

Microsoft PowerPoint - ch07_1.ppt 表單 7-1 認識表單 表單的建立可以分成三個階段 : 一 決定要蒐集的資料二 建立表單三 設計表單處理程式 單行文字方塊 多行文字方塊 核取方塊 選擇鈕 下拉式功能表 按鈕 密碼欄位 7-2 將電腦架設為 Web 伺服器 1. 2. 3. 7-3 建立表單的輸入介面 ... 標籤屬性解說 : ACCEPT-CHARSET="..." ACCEPT="... ACTION="URL

More information

Microsoft Word - A201101-1519.doc

Microsoft Word - A201101-1519.doc 5 10 15 20 25 30 基 于 ASP+ACCESS 的 辽 宁 工 程 技 术 大 学 考 试 网 的 设 计 与 开 发 董 强 1, 宋 喜 义 2 2**, 黄 培 泉 (1. 辽 宁 工 程 技 术 大 学 安 全 科 学 与 工 程 学 院, 辽 宁 阜 新 123000; 2. 辽 宁 工 程 技 术 大 学 实 验 实 训 中 心, 辽 宁 阜 新 123000) 摘 要

More information

ThreeDtunnel.doc

ThreeDtunnel.doc (12) 1 1. Visual Basic Private Sub LoadDatabase() Dim strip As String Dim straccount As String Dim strpassword As String Dim strdatabase As String Dim strtable As String Dim strsql As String Dim strtemp1

More information

穨文件1

穨文件1 2-1 Access 2000 Visual Basic Access 2000 97 Office Visual Basic Visual Basic Visual Basic VBA Visual Basic Visual Basic 2-1-1 Visual Basic Access Visual Basic ( ) 2-1 2-1 Visual Basic 2-1 Microsoft Access

More information

epub 61-2

epub 61-2 2 Web Dreamweaver UltraDev Dreamweaver 3 We b We b We Dreamweaver UltraDev We b Dreamweaver UltraDev We b We b 2.1 Web We b We b D r e a m w e a v e r J a v a S c r i p t We b We b 2.1.1 Web We b C C +

More information

untitled

untitled 1 .NET 利 [] [] 來 說 切 切 理 [] [ ] 來 說 拉 類 類 [] [ ] 列 連 Web 行流 來 了 不 不 不 流 立 行 Page 類 Load 理 Response 類 Write 料 Redirect URL Response.Write("!! ives!!"); Response.Redirect("WebForm2.aspx"); (1) (2) Web Form

More information

untitled

untitled 1 LinkButton LinkButton 連 Button Text Visible Click HyperLink HyperLink 來 立 連 Text ImageUrl ( ) NavigateUrl 連 Target 連 _blank _parent frameset _search _self 連 _top 例 sample2-a1 易 連 private void Page_Load(object

More information

untitled

untitled II III IV V VI VII VIII IX 2 ASP 1 ASP 3 4 ASP Web CGI ISAPI OLEISAPI Perl IDC ASP dbweb Perl IDC ASP dbweb IDC 1 ASP 5 Web Web DLL 6 ASP 1 ASP 7 8 ASP 1 ASP 9 10 ASP 1 ASP 11 12 ASP 1 ASP 13 14 ASP 1

More information

第1章 在线考试系统

第1章  在线考试系统 ASP+SQL Server http://www.dearbook.com.cn/book/101885 http://www.china-pub.com/computers/common/info.asp?id=28801 http://www.douban.com/group/19963/ ASP ASP Web 1 1.1 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.3 1.4

More information

27 :OPC 45 [4] (Automation Interface Standard), (Costom Interface Standard), OPC 2,,, VB Delphi OPC, OPC C++, OPC OPC OPC, [1] 1 OPC 1.1 OPC OPC(OLE f

27 :OPC 45 [4] (Automation Interface Standard), (Costom Interface Standard), OPC 2,,, VB Delphi OPC, OPC C++, OPC OPC OPC, [1] 1 OPC 1.1 OPC OPC(OLE f 27 1 Vol.27 No.1 CEMENTED CARBIDE 2010 2 Feb.2010!"!!!!"!!!!"!" doi:10.3969/j.issn.1003-7292.2010.01.011 OPC 1 1 2 1 (1., 412008; 2., 518052), OPC, WinCC VB,,, OPC ; ;VB ;WinCC Application of OPC Technology

More information

2

2 1 2 1-1 Visual Basic 3 1-2 3/8-3/21 3/22-4/4 4/5-4/18 4/19-5/2 5/3-5/16 5/17-5/30 5/31-6/13 6/14-6/27 6/28-7/11 7/12-7/25 7/26-8/8 8/9-8/22 8/25-9/5 9/6-9/19 9/20-10/3 10/4-10/17 10/18-10/31 11/15-11/28

More information

穨ac3-4.PDF

穨ac3-4.PDF 4-1 VBA Access 4-1-1 Access 2000 4-1 4-1 Access 2000 4-1 Visual Basic Access 2000 ( ADO DAO ) Access 2000 VBA Office Access VBA Access 8.0(97 ) DAO Access 2000 DAO ADO 2.1 OLE Automation ADO 2.1 DAO ADO

More information

IIS Web FTP

IIS Web FTP 1... 1 1... 1 2... 1 3... 2 6 C/S... 2 4... 4 7... 5 8... 5 9... 6 10 Web... 7 11 CORBA... 8 12... 8 2... 9 1... 9 2... 9 3... 10 4 BSP Business System Planning... 11 5... 13 6... 15 7... 15 8... 16 9...

More information

公用副程式

公用副程式 7.1 TableStruct( 資料表結構體變數 ) 2 7.2 OpenCon( 連線程序 ) 3 7.3 SetMysqlCharSet( 設定中文介面 ) 4 7.4 UseWDB( 切換資料庫 ) 5 7.5 GetDBlist( 列舉資料庫明細 ) 6 7.6 MakeTableList( 列舉資料表明細 ) 8 7.7 GetKeyValue( 取得不重覆鍵值紀錄 ) 9 7.8 FindKeyValue(

More information

13 根 据 各 种 网 络 商 务 信 息 对 不 同 用 户 所 产 生 的 使 用 效 用, 网 络 商 务 信 息 大 致 可 分 为 四 级, 其 中 占 比 重 最 大 的 是 ( A ) A 第 一 级 免 费 信 息 B 第 二 级 低 收 费 信 息 C 第 三 级 标 准 收 费

13 根 据 各 种 网 络 商 务 信 息 对 不 同 用 户 所 产 生 的 使 用 效 用, 网 络 商 务 信 息 大 致 可 分 为 四 级, 其 中 占 比 重 最 大 的 是 ( A ) A 第 一 级 免 费 信 息 B 第 二 级 低 收 费 信 息 C 第 三 级 标 准 收 费 助 理 电 子 商 务 考 试 真 题 试 题 第 一 部 分 : 理 论 部 分 一 单 项 选 择 题 1 ( B ) 是 信 息 系 统 的 核 心 组 成 部 分 A 逻 辑 模 型 B 数 据 库 C 概 念 模 型 D 以 上 全 部 2 ping www.163.com -t 中 参 数 t 的 作 用 是 :( A ) A 进 行 连 续 测 试 B 在 新 窗 口 中 显 示 C

More information

輕鬆學 Dreamweaver CS5 網頁設計..\Example\Ch0\ \.html..\example\ch0\ \mouse.txt..\example\ch0\ \ _Ok.html 學習重點 JavaScript 複製程式碼 mouse.txt Ctrl+C Ctrl+C 0-4

輕鬆學 Dreamweaver CS5 網頁設計..\Example\Ch0\ \.html..\example\ch0\ \mouse.txt..\example\ch0\ \ _Ok.html 學習重點 JavaScript 複製程式碼 mouse.txt Ctrl+C Ctrl+C 0-4 JAVA Extension 0..\Example\Ch0\ \ T.html..\Example\Ch0\ \ T.txt T.txt..\Example\Ch0\ \ T_Ok.html 提示 :. Marquee Marquee Font Color #FFFFFF BG Color #867bf Width 90 Height 50. T.txt Ctrl+C your scrolling

More information

TC35短信发送程序设计

TC35短信发送程序设计 http://www.dragonsoft.net.cn/down/project/tc35_sms.rar TC35 AT /down/book/tc35_at.pdf TC35/TC35i GSM Modem TC35 GSM POS COM SIM DOWN COM E, vbcr AT VB6.0 1)C# http://www.yesky.com/softchannel/72342380468109312/20040523/1800310.shtml,

More information

Microsoft Word - A200904-291.doc

Microsoft Word - A200904-291.doc 基 于 Access 的 学 生 成 绩 查 询 系 统 的 设 计 田 立 坤 中 国 矿 业 大 学 ( 南 湖 校 区 ) 计 算 机 学 院 信 科 系, 江 苏 徐 州 (221008) Email:tianlikun1111@126.com 摘 要 : 数 据 库 技 术 是 现 代 企 业 管 理 自 动 化 的 重 要 而 关 键 的 环 节, 在 日 益 信 息 化 办 公 电 脑

More information

(CIP) Web /,. :,2005. 1 ISBN 7 81058 782 X.W............T P393.4 CIP (2004) 118797 Web ( 99 200436) ( http:/ / www.shangdapress.com 66135110) : * 787

(CIP) Web /,. :,2005. 1 ISBN 7 81058 782 X.W............T P393.4 CIP (2004) 118797 Web ( 99 200436) ( http:/ / www.shangdapress.com 66135110) : * 787 Web (CIP) Web /,. :,2005. 1 ISBN 7 81058 782 X.W............T P393.4 CIP (2004) 118797 Web ( 99 200436) ( http:/ / www.shangdapress.com 66135110) : * 787 1092 1/ 16 30.75 748 2005 1 1 2005 1 1 : 1 3 100

More information

untitled

untitled PowerBuilder Tips 利 PB11 Web Service 年度 2 PB Tips PB9 EAServer 5 web service PB9 EAServer 5 了 便 web service 來說 PB9 web service 力 9 PB11 release PB11 web service 力更 令.NET web service PB NVO 論 不 PB 來說 說

More information

Microsoft Word - 01.DOC

Microsoft Word - 01.DOC 第 1 章 JavaScript 简 介 JavaScript 是 NetScape 公 司 为 Navigator 浏 览 器 开 发 的, 是 写 在 HTML 文 件 中 的 一 种 脚 本 语 言, 能 实 现 网 页 内 容 的 交 互 显 示 当 用 户 在 客 户 端 显 示 该 网 页 时, 浏 览 器 就 会 执 行 JavaScript 程 序, 用 户 通 过 交 互 式 的

More information

untitled

untitled 1 Outline 料 類 說 Tang, Shih-Hsuan 2006/07/26 ~ 2006/09/02 六 PM 7:00 ~ 9:30 聯 ives.net@gmail.com www.csie.ntu.edu.tw/~r93057/aspnet134 度 C# 力 度 C# Web SQL 料 DataGrid DataList 參 ASP.NET 1.0 C# 例 ASP.NET 立

More information

Microsoft PowerPoint - VB14.ppt

Microsoft PowerPoint - VB14.ppt VB 列表盒 LISTBOX 應用 資科系 林偉川 執行畫面 1 2 1 重要屬性 LISTBOX 物件 (VB6) 新增至 LISTBOX 物件中 ADDITEM 自 LISTBOX 物件中刪除選取物件 REMOVEITEM 自 LISTBOX 物件中取出選取物件 ListIndex 顯示 LISTBOX 物件中紀錄個數 Listcount 3 LISTBOX 物件 (VB.NET) 重要屬性 新增至

More information

多層次傳銷與獎金系統

多層次傳銷與獎金系統 醒 吾 技 術 學 院 資 訊 管 理 系 ( 五 專 部 ) 九 十 六 學 年 度 畢 業 專 題 多 層 次 傳 銷 與 獎 金 系 統 組 員 : 921506122 游 濬 瑋 921506126 陳 彥 宇 921506139 林 龍 華 921506144 陳 昶 志 921506149 楊 璧 如 指 導 老 師 : 汪 淵 老 師 中 華 民 國 九 十 七 年 一 月 十 一 醒

More information

RUN_PC連載_8_.doc

RUN_PC連載_8_.doc PowerBuilder 8 (8) Web DataWindow ( ) DataWindow Web DataWindow Web DataWindow Web DataWindow PowerDynamo Web DataWindow / Web DataWindow Web DataWindow Wizard Web DataWindow Web DataWindow DataWindow

More information

ebook46-23

ebook46-23 23 Access 2000 S Q L A c c e s s S Q L S Q L S Q L S E L E C T S Q L S Q L A c c e s s S Q L S Q L I N A N S I Jet SQL S Q L S Q L 23.1 Access 2000 SQL S Q L A c c e s s Jet SQL S Q L U N I O N V B A S

More information

The golden pins of the PCI card can be oxidized after months or years

The golden pins of the PCI card can be oxidized after months or years Q. 如何在 LabWindows/CVI 編譯 DAQ Card 程式? A: 請參考至下列步驟 : 步驟 1: 安裝驅動程式 1. 安裝 UniDAQ 驅動程式 UniDAQ 驅動程式下載位置 : CD:\NAPDOS\PCI\UniDAQ\DLL\Driver\ ftp://ftp.icpdas.com/pub/cd/iocard/pci/napdos/pci/unidaq/dll/driver/

More information

Microsoft Word - PHP7Ch01.docx

Microsoft Word - PHP7Ch01.docx PHP 01 1-6 PHP PHP HTML HTML PHP CSSJavaScript PHP PHP 1-6-1 PHP HTML PHP HTML 1. Notepad++ \ch01\hello.php 01: 02: 03: 04: 05: PHP 06:

More information

ebook4-12

ebook4-12 12 CGI C G I (Common Gateway Interface) We b P H P C G I H T M L H T T P H T M L We b H T T P We We b I n t e r n e t R F C h t t p : / / w w w. i e t f. o rg / P H P C G I C G A p a c h e C G I P H P

More information

Microsoft PowerPoint - ch15_1.ppt

Microsoft PowerPoint - ch15_1.ppt JavaScript 實用範例 15-1 視窗基本操作 15-1-1 歡迎對話方塊 顯示歡迎視窗 15-1-2 告別對話方塊 顯示告別視窗

More information

目錄

目錄 資 訊 素 養 線 上 教 材 單 元 五 資 料 庫 概 論 及 Access 5.1 資 料 庫 概 論 5.1.1 為 什 麼 需 要 資 料 庫? 日 常 生 活 裡 我 們 常 常 需 要 記 錄 一 些 事 物, 以 便 有 朝 一 日 所 記 錄 的 事 物 能 夠 派 得 上 用 場 我 們 能 藉 由 記 錄 每 天 的 生 活 開 銷, 就 可 以 在 每 個 月 的 月 底 知

More information

四川省普通高等学校

四川省普通高等学校 四 川 省 普 通 高 等 学 校 计 算 机 应 用 知 识 和 能 力 等 级 考 试 考 试 大 纲 (2013 年 试 行 版 ) 四 川 省 教 育 厅 计 算 机 等 级 考 试 中 心 2013 年 1 月 目 录 一 级 考 试 大 纲 1 二 级 考 试 大 纲 6 程 序 设 计 公 共 基 础 知 识 6 BASIC 语 言 程 序 设 计 (Visual Basic) 9

More information

導讀 ASP.NET HTML ASP 第一篇 基礎篇第 1 章 認識 ASP.NET ASP.NET ASP.NET ASP.NET ASP.NET 第 2 章 認識 Visual Studio 20 開發環境 Visual Studio 20 Visual Studio 20 第二篇 C# 程式

導讀 ASP.NET HTML ASP 第一篇 基礎篇第 1 章 認識 ASP.NET ASP.NET ASP.NET ASP.NET ASP.NET 第 2 章 認識 Visual Studio 20 開發環境 Visual Studio 20 Visual Studio 20 第二篇 C# 程式 導讀 ASP.NET HTML ASP 第一篇 基礎篇第 1 章 認識 ASP.NET ASP.NET ASP.NET ASP.NET ASP.NET 第 2 章 認識 Visual Studio 20 開發環境 Visual Studio 20 Visual Studio 20 第二篇 C# 程式語言篇第 3 章 C# 程式語言基礎 C# C# 3.0 var 第 4 章 基本資料處理 C# x

More information

任務二 : 產生 20 個有炸彈的磚塊, 放在隨機的位置編輯 Block 類別的程式碼 import greenfoot.; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) Write a description of class

任務二 : 產生 20 個有炸彈的磚塊, 放在隨機的位置編輯 Block 類別的程式碼 import greenfoot.; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) Write a description of class 踩地雷遊戲 高慧君南港高中 開啟專案 MineSweep 任務一 : 產生 30X20 個磚塊編輯 Table 類別的程式碼 import greenfoot.; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) import java.util.arraylist; Write a description of class MyWorld

More information

Microsoft Word - 小心翼翼的二十一點N.doc

Microsoft Word - 小心翼翼的二十一點N.doc 投 稿 類 別 : 資 訊 類 篇 名 : 小 心 翼 翼 的 二 十 一 點 作 者 : 陳 鈺 文 國 立 瑞 芳 高 級 工 業 職 業 學 校 資 訊 二 李 伯 謙 國 立 瑞 芳 高 級 工 業 職 業 學 校 資 訊 二 胡 家 媛 國 立 瑞 芳 高 級 工 業 職 業 學 校 資 訊 二 指 導 老 師 : 周 曉 玲 老 師 陳 思 亮 主 任 壹 前 言 一 研 究 動 機 平

More information

epub83-1

epub83-1 C++Builder 1 C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r 1.1 1.1.1 1-1 1. 1-1 1 2. 1-1 2 A c c e s s P a r a d o x Visual FoxPro 3. / C / S 2 C + + B u i l d e r / C

More information

Excel VBA Excel Visual Basic for Application

Excel VBA  Excel Visual Basic for Application Excel VBA Jun5,00 Sub 分頁 () Dim i As Integer Dim Cname As String Dim Code As Variant Set score=thisworkbook.sheets("sheet") Code=Array(" 專北一 "," 專北二 "," 專北三 "," 專桃園 "," 專桃竹 "," 專中苗 ", " 專台中 "," 專台南 ","

More information

The Applicibility of Google Maps/Earth and Urmap API to Real Estate Database* Jin-Tsong Hwang** Abstract Whether the real estate market is prosperous

The Applicibility of Google Maps/Earth and Urmap API to Real Estate Database* Jin-Tsong Hwang** Abstract Whether the real estate market is prosperous 53 73 Journal of Taiwan Land Research Vol. 9, No.2 pp. 53~73 Google Maps/Earth Urmap API * ** 95 4 7 95 7 4 摘 要 ASP Google Maps/Earth Urmap API * ** E-mail jthwang@mail.ntpu.edu.tw 53 The Applicibility

More information

untitled

untitled JavaEE+Android - 6 1.5-2 JavaEE web MIS OA ERP BOSS Android Android Google Map office HTML CSS,java Android + SQL Sever JavaWeb JavaScript/AJAX jquery Java Oracle SSH SSH EJB+JBOSS Android + 1. 2. IDE

More information

基于UML建模的管理管理信息系统项目案例导航——VB篇

基于UML建模的管理管理信息系统项目案例导航——VB篇 PowerBuilder 8.0 PowerBuilder 8.0 12 PowerBuilder 8.0 PowerScript PowerBuilder CIP PowerBuilder 8.0 /. 2004 21 ISBN 7-03-014600-X.P.. -,PowerBuilder 8.0 - -.TP311.56 CIP 2004 117494 / / 16 100717 http://www.sciencep.com

More information

ActiveX Control

ActiveX Control ActiveX Control For Visual Basic 2005.NET [ 版本 : 1.0] 1 安裝 Windows 驅動程式 請依照下列步驟 : 1. 執行 Windows 驅動程式安裝程式 ( 此範例為 PIO-DIO) 驅動程式位置 : CD:\NAPDOS\PCI\PIO-DIO\dll_ocx\Driver http://ftp.icpdas.com/pub/cd/iocard/pci/napdos/pci/pio-dio/dll_ocx/driver/

More information

untitled

untitled 說 參 例 邏 邏 1. 說 2. 數 數 3. 8 4. 理念 李 龍老 立 1. 理 料 2. 理 料 3. 數 料 4. 流 邏 念 5. 良 6. 讀 行 行 7. 行 例 來 邏 1. 說 說 識 量 2. 說 理 類 3. 數 數 念 4. 令 5. 良 6. 流 邏 念 7. 說 邏 理 力 1. 2. 3. 4. 5. 列 念 1 參 1. ( Visual Basic 例 ) (1)

More information

FileMaker 16 ODBC 和 JDBC 指南

FileMaker 16 ODBC 和 JDBC 指南 FileMaker 16 ODBC JDBC 2004-2017 FileMaker, Inc. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker FileMaker Go FileMaker, Inc. FileMaker WebDirect FileMaker Cloud FileMaker,

More information

untitled

untitled 1 .NET 料.NET 料 料來 類.NET Data Provider SQL.NET Data Provider System.Data.SqlClient 料 MS-SQL OLE DB.NET Data Provider System.Data.OleDb 料 Dbase FoxPro Excel Access Oracle Access ODBC.NET Data Provider 料

More information

1.JasperReport ireport JasperReport ireport JDK JDK JDK JDK ant ant...6

1.JasperReport ireport JasperReport ireport JDK JDK JDK JDK ant ant...6 www.brainysoft.net 1.JasperReport ireport...4 1.1 JasperReport...4 1.2 ireport...4 2....4 2.1 JDK...4 2.1.1 JDK...4 2.1.2 JDK...5 2.1.3 JDK...5 2.2 ant...6 2.2.1 ant...6 2.2.2 ant...6 2.3 JasperReport...7

More information

概述

概述 OPC Version 1.6 build 0910 KOSRDK Knight OPC Server Rapid Development Toolkits Knight Workgroup, eehoo Technology 2002-9 OPC 1...4 2 API...5 2.1...5 2.2...5 2.2.1 KOS_Init...5 2.2.2 KOS_InitB...5 2.2.3

More information

天津天狮学院关于修订2014级本科培养方案的指导意见

天津天狮学院关于修订2014级本科培养方案的指导意见 目 录 天 津 天 狮 院 关 于 修 订 2014 级 本 科 培 养 方 案 的 指 导 意 见...1 金 融 类 专 业...9 金 融 专 业 培 养 方 案...9 保 险 专 业 培 养 方 案...14 人 力 资 源 管 理 专 业 培 养 方 案...19 劳 动 与 社 会 保 障 专 业 培 养 方 案...24 工 商 管 理 类 专 业...29 市 场 营 销 专 业

More information

untitled

untitled 1 Access 料 (1) 立 料 [] [] [ 料 ] 立 料 Access 料 (2) 料 [ 立 料 ] Access 料 (3) 料 料 料 料 料 料 欄 ADO.NET ADO.NET.NET Framework 類 來 料 料 料 料 料 Ex MSSQL Access Excel XML ADO.NET 連 .NET 料.NET 料 料來 類.NET Data Provider

More information

untitled

untitled Data Source 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 8-1 Data Source 8-2 Data Source 8-3 Data Source 8-4 Data Source 8-5 DataSourceID 8-6 DataSourceMode 8-7 DataSource 8-8 8-9 Parameter Direction

More information

Microsoft PowerPoint - 13_ClassAndObj.ppt

Microsoft PowerPoint - 13_ClassAndObj.ppt Visual Basic 2005 (VB.net 2.0) 程式設計 講師 : 戴志華 hana@arbor.ee.ntu.edu.tw 國立台灣大學電機工程研究所 第十三章 物件與類別 物件與類別 物件導向程式設計 物件與類別的建立 物件與類別 物件 (object) Ex. 人 屬性 (property) 身高 體重 血型 方法 (method) 走路 跑步 訊息 (message) 交談 事件

More information

TopTest_Adminstrator.doc

TopTest_Adminstrator.doc 壹 前 言... 3 貳 系 統 簡 介... 4 一 TKB multimedia Top-Test 系 統 架 構...4 1. 使 用 者 介 面 層 (Presentation tier)...5 2. 商 業 邏 輯 層 (business logic tier)...5 3. 資 料 服 務 層 (data services tier)...5 二 TKB Multimedia Top-Test

More information

PowerPoint Presentation

PowerPoint Presentation Visual Basic 程式設計 檔案存取 檔案控制項元件 File System Objects DriveList 屬性 Drive List ListCount ListIndex 目前磁碟機代碼可選擇磁碟機可選擇磁碟機個數已選擇的磁碟機的位置 事件 Change 所選擇的磁碟機改變時 2 DriveListBox (cont.) Private Sub Drive1_Change() Print

More information

0SQL SQL SQL SQL SQL 3 SQL DBMS Oracle DBMS DBMS DBMS DBMS RDBMS R DBMS 2 DBMS RDBMS R SQL SQL SQL SQL SELECT au_fname,au_ lname FROM authors ORDER BY

0SQL SQL SQL SQL SQL 3 SQL DBMS Oracle DBMS DBMS DBMS DBMS RDBMS R DBMS 2 DBMS RDBMS R SQL SQL SQL SQL SELECT au_fname,au_ lname FROM authors ORDER BY 0 SQL SQL SELECT DISTINCT city, state FROM customers; SQL SQL DBMS SQL DBMS SQL 0-1 SQL SQL 0SQL SQL SQL SQL SQL 3 SQL DBMS Oracle DBMS DBMS DBMS DBMS RDBMS R DBMS 2 DBMS RDBMS R SQL SQL SQL SQL SELECT

More information

epub 2-2

epub 2-2 2 A S P A S P A S P A S V B S c r i p t A S P A c t i v e X A S P A c t i v e X A S P A S P A c t i v e X A S P A p p l i c a t i o n A p p l i c a t i o n A p p l i c a t i o n R e q u e s t R e q u e

More information

5-1 nav css 5-2

5-1 nav css 5-2 5 HTML CSS HTML CSS Ê Ê Ê Ê 5-1 nav css 5-2 5-1 5 5-1-1 5-01 css images 01 index.html 02 5-3 style.css css 03 CH5/5-01/images 04 images index.html style.css 05

More information

1 1 Excel VBA 說明 ( ) (_) STEP4 Excel 2 STEP5 A1 1 B2 2 C3 3 STEP6 A1 STEP7 > > 1-11

1 1 Excel VBA 說明 ( ) (_) STEP4 Excel 2 STEP5 A1 1 B2 2 C3 3 STEP6 A1 STEP7 > > 1-11 1-3 1-3-1 Excel VBA VBA OK CD DVD Excel VBA Excel VBA Excel Visual Basic A1 1 B2 2 C3 3 STEP1 Excel Ch01_VBA.xlsm 1 > > STEP2 Excel 1 2 STEP3 1-10 1 1 Excel VBA 說明 ( ) (_) STEP4 Excel 2 STEP5 A1 1 B2 2

More information

目 录 1. 业 务 流 程 系 统 开 发 面 临 的 挑 战 与 机 遇... 3 1.1 业 务 流 程 管 理... 4 2. 新 一 代 开 源 业 务 流 程 开 发 平 台 BPMX3... 5 2.1 BPMX3 是 什 么... 5 2.2 为 什 么 要 优 先 采 用 BPMX

目 录 1. 业 务 流 程 系 统 开 发 面 临 的 挑 战 与 机 遇... 3 1.1 业 务 流 程 管 理... 4 2. 新 一 代 开 源 业 务 流 程 开 发 平 台 BPMX3... 5 2.1 BPMX3 是 什 么... 5 2.2 为 什 么 要 优 先 采 用 BPMX BPMX3 技 术 白 皮 书 业 务 流 程 开 发 平 台 介 绍 目 录 1. 业 务 流 程 系 统 开 发 面 临 的 挑 战 与 机 遇... 3 1.1 业 务 流 程 管 理... 4 2. 新 一 代 开 源 业 务 流 程 开 发 平 台 BPMX3... 5 2.1 BPMX3 是 什 么... 5 2.2 为 什 么 要 优 先 采 用 BPMX3... 5 2.2.1 BPMX3

More information

1 1 大概思路 创建 WebAPI 创建 CrossMainController 并编写 Nuget 安装 microsoft.aspnet.webapi.cors 跨域设置路由 编写 Jquery EasyUI 界面 运行效果 2 创建 WebAPI 创建 WebAPI, 新建 -> 项目 ->

1 1 大概思路 创建 WebAPI 创建 CrossMainController 并编写 Nuget 安装 microsoft.aspnet.webapi.cors 跨域设置路由 编写 Jquery EasyUI 界面 运行效果 2 创建 WebAPI 创建 WebAPI, 新建 -> 项目 -> 目录 1 大概思路... 1 2 创建 WebAPI... 1 3 创建 CrossMainController 并编写... 1 4 Nuget 安装 microsoft.aspnet.webapi.cors... 4 5 跨域设置路由... 4 6 编写 Jquery EasyUI 界面... 5 7 运行效果... 7 8 总结... 7 1 1 大概思路 创建 WebAPI 创建 CrossMainController

More information

untitled

untitled 1 行 行 行 行.NET 行 行 類 來 行 行 Thread 類 行 System.Threading 來 類 Thread 類 (1) public Thread(ThreadStart start ); Name 行 IsAlive 行 行狀 Start 行 行 Suspend 行 Resume 行 行 Thread 類 (2) Sleep 行 CurrentThread 行 ThreadStart

More information

2 WF 1 T I P WF WF WF WF WF WF WF WF 2.1 WF WF WF WF WF WF

2 WF 1 T I P WF WF WF WF WF WF WF WF 2.1 WF WF WF WF WF WF Chapter 2 WF 2.1 WF 2.2 2. XAML 2. 2 WF 1 T I P WF WF WF WF WF WF WF WF 2.1 WF WF WF WF WF WF WF WF WF WF EDI API WF Visual Studio Designer 1 2.1 WF Windows Workflow Foundation 2 WF 1 WF Domain-Specific

More information

Microsoft PowerPoint - OPVB1基本VB.ppt

Microsoft PowerPoint - OPVB1基本VB.ppt 大 綱 0.VB 能 做 什 麼? CH1 VB 基 本 認 識 1.VB 歷 史 與 版 本 2.VB 環 境 簡 介 3. 即 時 運 算 視 窗 1 0.VB 能 做 什 麼? Visual Basic =>VB=> 程 式 設 計 語 言 => 設 計 程 式 設 計 你 想 要 的 功 能 的 程 式 自 動 化 資 料 庫 計 算 模 擬 遊 戲 網 路 監 控 實 驗 輔 助 自 動

More information

關於本書 l 3 PhoneGap Appcelerator Titanium Sencha Touch (wrapper framework) Native App PhoneGap Build Native App Hybrid App Java Objective-C Android SDK

關於本書 l 3 PhoneGap Appcelerator Titanium Sencha Touch (wrapper framework) Native App PhoneGap Build Native App Hybrid App Java Objective-C Android SDK 2 l 跨裝置網頁設計 Android ios Windows 8 BlackBerry OS Android HTML 5 HTML 5 HTML 4.01 HTML 5 CSS 3 CSS 3 CSS 2.01 CSS 3 2D/3D PC JavaScript

More information

3.1 num = 3 ch = 'C' 2

3.1 num = 3 ch = 'C' 2 Java 1 3.1 num = 3 ch = 'C' 2 final 3.1 final : final final double PI=3.1415926; 3 3.2 4 int 3.2 (long int) (int) (short int) (byte) short sum; // sum 5 3.2 Java int long num=32967359818l; C:\java\app3_2.java:6:

More information

Microsoft PowerPoint - 09.Android 程式設計-SQLite

Microsoft PowerPoint - 09.Android 程式設計-SQLite 計劃名稱 : 104 年度教育部資通訊軟體創新人才推升推廣計畫跨校資源中心 : 雲端運算 ( 國立中山大學 ) 課程名稱 : 網路及平台服務 Part1- 課程教材 教材名稱 :Android 程式設計 -SQLite 國立高雄大學資訊工程學系張保榮教授 大綱 SQLite execsql() 函式 rawquery() 函式 insert() 函式 delet() 函式 update() 函式 query()

More information

FileMaker 15 ODBC 和 JDBC 指南

FileMaker 15 ODBC 和 JDBC 指南 FileMaker 15 ODBC JDBC 2004-2016 FileMaker, Inc. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker FileMaker Go FileMaker, Inc. / FileMaker WebDirect FileMaker, Inc. FileMaker

More information

回滚段探究

回滚段探究 oracle oracle internal DBA oracle document oracle concepts oracle document oracle DBWR update t set object_id = '0' where object_id = '12344'; 1 row updated. commit; Commit complete. 0 12344 12344 0 10%

More information

<4D F736F F D B0D3B77EC3FEA7DEC3C0C476C1C9A5BFA6A1B8D5C3442DB57BA6A1B35DAD702DBEC7ACEC2E646F6378>

<4D F736F F D B0D3B77EC3FEA7DEC3C0C476C1C9A5BFA6A1B8D5C3442DB57BA6A1B35DAD702DBEC7ACEC2E646F6378> 全國國高級中中等學校 105 學年度商商業類學學生技藝藝競賽 程式式設計 職職種 學學科 試試卷 崗位位編號 : 姓名 : 注意事項 : 請將答案案劃記於答案案卡, 未依依規定劃記者者不予計分分 試題說明 :( 選擇題每每題 4 分, 共 100 分 ) ( )1. 執行以下 Visual Basic 程式片段, 其結果為何?(A) 15 Dim i As Byte i = &HFC Console.WriteLine(Not

More information

關於本書 Part 3 CSS XHTML Ajax Part 4 HTML 5 API JavaScript HTML 5 API Canvas API ( ) Video/Audio API ( ) Drag and Drop API ( ) Geolocation API ( ) Part 5

關於本書 Part 3 CSS XHTML Ajax Part 4 HTML 5 API JavaScript HTML 5 API Canvas API ( ) Video/Audio API ( ) Drag and Drop API ( ) Geolocation API ( ) Part 5 網頁程式設計 HTML JavaScript CSS HTML JavaScript CSS HTML 5 JavaScript JavaScript HTML 5 API CSS CSS Part 1 HTML HTML 5 API HTML 5 Apple QuickTime Adobe Flash RealPlayer Ajax XMLHttpRequest HTML 4.01 HTML 5

More information

Visual Basic D 3D

Visual Basic D 3D Visual Basic 2008 2D 3D 6-1 6-1 - 6-2 - 06 6-2 STEP 1 5-2 (1) STEP 2 5-3 (2) - 6-3 - Visual Basic 2008 2D 3D STEP 3 User1 6-4 (3) STEP 4 User1 6-5 (4) - 6-4 - 06 STEP 5 6-6 (5) 6-3 6-3-1 (LoginForm) PictureBox1

More information

PowerPoint Presentation

PowerPoint Presentation Visual Basic 2005 學 習 範 本 第 7 章 陣 列 的 活 用 7-1 陣 列 當 我 們 需 要 處 理 資 料 時, 都 使 用 變 數 來 存 放 資 料 因 為 一 個 變 數 只 能 代 表 一 個 資 料, 若 需 要 處 理 100 位 同 學 的 成 績 時, 便 要 使 用 100 個 不 同 的 變 數 名 稱, 這 不 但 會 增 加 變 數 名 稱 命 名

More information

基于CDIO一体化理念的课程教学大纲设计

基于CDIO一体化理念的课程教学大纲设计 Java 语 言 程 序 设 计 课 程 教 学 大 纲 Java 语 言 程 序 设 计 课 程 教 学 大 纲 一 课 程 基 本 信 息 1. 课 程 代 码 :52001CC022 2. 课 程 名 称 :Java 语 言 程 序 设 计 3. 课 程 英 文 名 称 :Java Programming 4. 课 程 类 别 : 理 论 课 ( 含 实 验 上 机 或 实 践 ) 5. 授

More information

(HMI) IO A

(HMI) IO A 6.5 6.5 (HMI) IO 6.52 6.52 6.5 2007 113 A 602 100086 010 82616619 010 62638166 www.kingview.com 4 7 25 38 43 52 63 68 86 SQL 95 99 WEB 105 Web Web Web I/O Microsoft Windows XP/NT/2000 I/O PLC PLC PLC PLC

More information

Microsoft Word - Mail2000_SecurityPatch_

Microsoft Word - Mail2000_SecurityPatch_ Mail2000 安全性加強程式 網擎資訊軟體股份有限公司謹呈 1 Mail2000 安全性加強程式 Introduction Mail2000 安全性加強程式, 是針對 Mail2000 V4.0 以上版本, 包括 V4.0 及 V4.5 版本所提供, 以加強系統的安全性, 減少因惡意信件而引起的安全性問題 版本名稱 Mail2000 版本作業系統檔案名稱 V4.0 單一網域版本 V4.0 SDSS

More information

XXXXXXXX http://cdls.nstl.gov.cn 2 26

XXXXXXXX http://cdls.nstl.gov.cn 2 26 [ ] [ ] 2003-7-18 1 26 XXXXXXXX http://cdls.nstl.gov.cn 2 26 (2003-7-18) 1...5 1.1...5 1.2...5 1.3...5 2...6 2.1...6 2.2...6 2.3...6 3...7 3.1...7 3.1.1...7 3.1.2...7 3.1.2.1...7 3.1.2.1.1...8 3.1.2.1.2...10

More information

星星排列 _for loop Protected Sub Page_Load(ByVal sender As Object, ByVal e As Dim h As Integer = 7 'h 為變數 ' Dim i, j As Integer For i = 1 To h

星星排列 _for loop Protected Sub Page_Load(ByVal sender As Object, ByVal e As Dim h As Integer = 7 'h 為變數 ' Dim i, j As Integer For i = 1 To h 資訊系統與實習 製作 : 林郁君 一 2009.09.28 9X9 'button 被按下後 ' Dim i, j As Integer For i = 1 To 9 'i 從 1 到 9' For j = 1 To 9 'j 從 1 到 9' If j * i < 10 Then ' 如果 j 乘上 i 是為個位數 ' Response.Write(i & "*" & j & " =" & i *

More information

主程式 : public class Main3Activity extends AppCompatActivity { ListView listview; // 先整理資料來源,listitem.xml 需要傳入三種資料 : 圖片 狗狗名字 狗狗生日 // 狗狗圖片 int[] pic =new

主程式 : public class Main3Activity extends AppCompatActivity { ListView listview; // 先整理資料來源,listitem.xml 需要傳入三種資料 : 圖片 狗狗名字 狗狗生日 // 狗狗圖片 int[] pic =new ListView 自訂排版 主程式 : public class Main3Activity extends AppCompatActivity { ListView listview; // 先整理資料來源,listitem.xml 需要傳入三種資料 : 圖片 狗狗名字 狗狗生日 // 狗狗圖片 int[] pic =new int[]{r.drawable.dog1, R.drawable.dog2,

More information

SiteView技术白皮书

SiteView技术白皮书 SiteView ECC V6.2 技 术 白 皮 书 游 龙 网 络 科 技 ( 中 国 ) 有 限 公 司 DragonFlow Networks(China),Inc. 目 录 第 一 章 产 品 概 述... 3 第 二 章 系 统 结 构... 6 一 系 统 架 构... 7 1 用 户 管 理 模 块... 7 2 Web Server... 8 3 存 储 加 密 模 块... 8

More information

PowerBuilder 8開發技術講座_3_.PDF

PowerBuilder 8開發技術講座_3_.PDF PowerBuilder 8 (3) PowerBuilder 8 PowerBuilder 8 Web HTML PowerBuilder client ActiveX client Java client ASP PowerDynamo PowerBuilder 8 PowerSite PowerBuilder 8 Dynamo Web Site Web Target PowerDynamo PowerDynamo

More information

1. 2. Flex Adobe 3.

1. 2. Flex Adobe 3. 1. 2. Flex Adobe 3. Flex Adobe Flex Flex Web Flex Flex Flex Adobe Flash Player 9 /rich Internet applications/ria Flex 1. 2. 3. 4. 5. 6. SWF Flash Player Flex 1. Flex framework Adobe Flex 2 framework RIA

More information

untitled

untitled ADF Web ArcGIS Server ADF GeocodeConnection control 4-2 Web ArcGIS Server Application Developer Framework (ADF).NET interop semblies.net Web ADF GIS Server 4-3 .NET ADF Web Represent the views in ArcMap

More information

untitled

untitled 12-1 -2 VC# Web Blog 12-1 -1-1 12-1.1-1 C:\ ChartModuleSample_CSharp\Application\2001\ Files\ 4096 KB 120 Web.Config httpruntime maxrequestlength executiontimeout 12-2

More information

RUN_PC連載_12_.doc

RUN_PC連載_12_.doc PowerBuilder 8 (12) PowerBuilder 8.0 PowerBuilder PowerBuilder 8 PowerBuilder 8 / IDE PowerBuilder PowerBuilder 8.0 PowerBuilder PowerBuilder PowerBuilder PowerBuilder 8.0 PowerBuilder 6 PowerBuilder 7

More information

untitled

untitled MODBUS 1 MODBUS...1 1...4 1.1...4 1.2...4 1.3...4 1.4... 2...5 2.1...5 2.2...5 3...6 3.1 OPENSERIAL...6 3.2 CLOSESERIAL...8 3.3 RDMULTIBIT...8 3.4 RDMULTIWORD...9 3.5 WRTONEBIT...11 3.6 WRTONEWORD...12

More information

chapter 2 HTML5 目錄iii HTML HTML HTML HTML HTML canvas

chapter 2 HTML5 目錄iii HTML HTML HTML HTML HTML canvas Contents 目錄 chapter 1 1-1... 1-2 1-2... 1-3 HTML5... 1-3... 1-5 1-3... 1-9 Web Storage... 1-9... 1-10 1-4 HTML5... 1-14... 1-14... 1-15 HTML5... 1-15... 1-15... 1-16 1-5... 1-18 Apps... 1-18 HTML5 Cache

More information

fsfdsa

fsfdsa 資訊管理學系 授課教師 : 黃元巨博士 第 28 章資料的匯入與匯出 資料匯入方法 Bulk Copy Protocol(BCP) 透過轉換程式來轉換不同檔案格式的資料庫檔案 將資料匯出, 使其成為其它資料庫可接受之特定格式的檔案, 然後再到新的資料庫系統中將資料匯入 透過 XML 敘述展現資料庫中的資料 MySQL 資料匯入的方法 (1) 以批次模式匯入資料 (1) 插入資料的 SQL 敘述存成一個文字檔

More information

經濟統計資料庫管理資訊系統

經濟統計資料庫管理資訊系統 招 標 文 件 (1) 經 濟 部 投 資 審 議 委 員 會 全 球 投 資 審 議 管 理 資 訊 系 統 ( 第 3 期 ) 開 發 建 置 專 案 投 標 須 知 經 濟 部 投 資 審 議 委 員 會 中 華 民 國 95 年 2 月 經 濟 部 投 資 審 議 委 員 會 投 標 須 知 以 下 各 項 招 標 規 定 內 容, 由 機 關 填 寫, 投 標 廠 商 不 得 填 寫 或

More information

序 言 本 专 业 人 才 培 养 方 案 以 适 应 市 场 需 求 为 目 标, 根 据 学 校 校 企 双 主 体 人 才 培 养 的 要 求 和 移 动 应 用 开 发 专 业 的 特 点 设 置 课 程 体 系, 体 现 了 课 程 为 市 场 服 务 的 特 点 本 专 业 要 求 学

序 言 本 专 业 人 才 培 养 方 案 以 适 应 市 场 需 求 为 目 标, 根 据 学 校 校 企 双 主 体 人 才 培 养 的 要 求 和 移 动 应 用 开 发 专 业 的 特 点 设 置 课 程 体 系, 体 现 了 课 程 为 市 场 服 务 的 特 点 本 专 业 要 求 学 广 东 新 安 职 业 技 术 学 院 计 算 机 移 动 应 用 开 发 专 业 2016 级 人 才 培 养 方 案 专 业 方 向 负 责 人 : 梅 红 系 主 任 : 毛 立 冰 计 算 机 系 二 一 五 年 六 月 序 言 本 专 业 人 才 培 养 方 案 以 适 应 市 场 需 求 为 目 标, 根 据 学 校 校 企 双 主 体 人 才 培 养 的 要 求 和 移 动 应 用 开

More information