公用副程式

Size: px
Start display at page:

Download "公用副程式"

Transcription

1 7.1 TableStruct( 資料表結構體變數 ) OpenCon( 連線程序 ) SetMysqlCharSet( 設定中文介面 ) UseWDB( 切換資料庫 ) GetDBlist( 列舉資料庫明細 ) MakeTableList( 列舉資料表明細 ) GetKeyValue( 取得不重覆鍵值紀錄 ) FindKeyValue( 尋找鍵值紀錄 ) FindPrimaryKey( 尋找主鍵 ) LockTable( 資料表上鎖 ) UnlockTable( 資料表解鎖 ) InsertNewRecord( 新增紀錄 ) UpdateNewRecord( 更新紀錄 ) DeleteKeyValue( 刪除紀錄 ) GetTableStructure( 取得資料表結構 ) 23 回目錄 1

2 本章列示一些 EasydoMySQL 使用到的公用副程式, 讀者可將相關副程式加 到你自己的應用系統之模組程序內, 這些副程式可供表單程序叫用 7.1 TableStruct( 資料表結構體變數 ) 用途 : 資料表結構體變數可用來儲存開啟的資料表或以 SQL 指令開啟的紀錄集 相關屬性, 在新增 修改及刪除等資料處理工作, 此結構變數將用於表單與公用程序之資料傳遞工作 Public Structure TableStruct Dim fldname As String, 說明 : 欄名 Dim fldtitle As String, 說明 : 欄位抬頭 ( 中文欄名 ) Dim fldtype As String, 說明 : 資料型泰 Dim fldlength As Integer, 說明 : 欄寬 Dim fldnull As Boolean, 說明 : 允許空值 Dim fldprimary As Boolean, 說明 : 主鍵 Dim flddefault As String, 說明 : 預設值 Dim fldenum As String, 說明 : 列舉值 Dim fldencrypt As Boolean, 說明 : 需要加密 Dim tblsource As String, 說明 : 參考資料表 Dim fldsource As String, 說明 : 參考欄 Dim fldlocation As Point, 說明 : 控制項位置 Dim fldsize As Size, 說明 : 控制項尺寸 Dim fldvalue, 說明 : 介面存取資料 Dim fldexpress As String, 說明 : 運算式 Dim fldimemode As String, 說明 : 輸入法 End Structure 2

3 7.2 OpenCon( 連線程序 ) 用途 : 應用系統與 MySQL 連線 用戶登入 EasyDoMySQL 應用系統時, 立即以 此程序與 MySQL 資料庫連線, 在執行各項表單作業時, 若系統偵測到斷 線狀況時, 也可以叫用此程序來重新連線 Public Sub opencon(byval dbstr As String) Dim str As String Try Dim opvalue As Long opvalue = ' Normal Use str = "DRIVER={MySQL ODBC " & DRV & " Driver};SERVER=" & HST & "; DATABASE=" & dbstr & ";UID=" & USR & ";PASSWORD=" & PSW & ";Option= " & opvalue 說明 :DRV HST USR PSW 為系統變數, 由登錄表單設定 mycon = New OdbcConnection(str) If Not mycon.state = ConnectionState.Open Then mycon.open() If mycon.state = ConnectionState.Open Then Call SetMysqlCharSet(SysChar, mycon) 說明 : 設定中文介面 Catch ex As Exception MsgBox(" 無法連線..." & vbcrlf & ex.message) End Try End Sub 3

4 7.3 SetMysqlCharSet( 設定中文介面 ) 用途 : 設定中文介面, 包含主控端處理資料 伺服端回傳結果, 以及連線狀態之 介面資訊 Public Sub SetMysqlCharSet(ByVal charset As String, ByVal strcon As OdbcConnection) Try Dim str As String str = "Set character_set_client = " & charset & ";" 說明 :charset 為系統變數, 由登錄表單設定 mycmd = New OdbcCommand(str, strcon) mycmd.executenonquery() str = "Set character_set_results= " & charset & ";" mycmd = New OdbcCommand(str, strcon) mycmd.executenonquery() str = "Set character_set_connection = " & charset & ";" mycmd = New OdbcCommand(str, strcon) mycmd.executenonquery() Catch ex As Exception MsgBox(ex.Message) End Try End Sub 4

5 7.4 UseWDB( 切換資料庫 ) 用途 : 切換資料庫 當用戶需要處理不同的資料庫時, 就須以此程序來切換資料庫 Public Sub UseWDB(ByVal db As String) If db = "" Then Exit Sub Try Dim cmd As String cmd = "Use " & db mycmd = New OdbcCommand(cmd, mycon) mycmd.executenonquery() Catch ex As Exception MsgBox(ex.Message) End Try End Sub 5

6 7.5 GetDBlist( 列舉資料庫明細 ) 用途 : 取得資料庫明細, 回傳結果將作為有資料庫下拉方塊控制項之選項清單 回傳結果 : 字串, 資料庫名稱間必須以逗號間隔 Public Function getdblist() As String Try Dim str As String Dim dareader As OdbcDataReader If USR <> "root" And USR <> "Admin" Then Return WDB 說明 :USR 及 WDB 為系統變數, 由登錄表單設定 Exit Function str = "Use mysql" mycmd = New OdbcCommand(str, mycon) mycmd.executenonquery() str = "Show Databases" mycmd = New OdbcCommand(str, mycon) dareader = mycmd.executereader() str = "" 說明 : 逐筆取出資料庫名稱 Do While dareader.read() If dareader.item(0).tostring <> "information_schema" Then If str = "" Then str = dareader.item(0).tostring str = str & "," & dareader.item(0).tostring Loop dareader.close() Call UseWDB(WDB) Return str Catch ex As Exception MsgBox(ex.Message) 6

7 Return "" End Try End Function 7

8 7.6 MakeTableList( 列舉資料表明細 ) 用途 : 取得資料表明細, 回傳結果將作為有資料表下拉方塊控制項之選項清單 回傳結果 : 字串, 資料表名稱間必須以逗號間隔 Public Function maketablelist(byval db As String) As String Dim str As String Try str = "Use"& db mycmd = New OdbcCommand(str, mycon) mycmd.executenonquery() Dim tblreader As OdbcDataReader If USR = "root" Or USR = "Admin" Then str = "Show Tables From " & db & ";" 說明 : 系統管理者可顯示所有資料表 str = "Select WorkNo From UserRight Where Project='Table' And User='" str = str & USR &"' And Enable=True" 說明 : 一般用戶只能顯示有被授權的資料表 mycmd = New OdbcCommand(str, mycon) tblreader = mycmd.executereader str = "" 說明 : 逐筆取出資料表名稱 While tblreader.read str = str & tblreader.item(0).tostring & "," End While tblreader.close() If str <> "" Then str = Mid(str, 1, Len(str) - 1) Return str Catch ex As Exception MsgBox(ex.Message) Return "" End Try End Function 8

9 7.7 GetKeyValue( 取得不重覆鍵值紀錄 ) 用途 : 取得指定欄位資料不重覆紀錄, 回傳結果將作為有鍵值下拉方塊控制項之 選項清單 回傳結果 : 字串, 鍵值資料間以逗號間隔 Public Function getkeyvalue(byval stbl As String, ByVal skey As String) As String 回傳結果 : 布林值 If skey Is Nothing Then Return "" Exit Function Dim tp As Integer If stbl = "" Or skey = "" Then Return "" Exit Function Try Dim str As String Dim tblreader As OdbcDataReader If InStr(sTbl, "Select ") = 0 Then str = "Select Distinct " & skey & " From " & stbl & " Order By " & skey tp = 1, 說明 : 表傳入資料表 str = stbl tp = 2, 說明 : 表傳入 SQL 指令 mycmd = New OdbcCommand(str, mycon) tblreader = mycmd.executereader str = "" If tp = 1 Then While tblreader.read str = str & tblreader.item(0).tostring & "," 說明 : 將讀取資料串入回傳資料串 End While 9

10 If str <> "" Then str = Mid(str, 1, Len(str) - 1) Dim vl tblreader.read() vl = tblreader.item(skey) str = vl While tblreader.read If tblreader.item(skey) <> vl Then str = str & "," & tblreader.item(0).tostring 說明 : 將讀取資料串入回傳資料串 vl = tblreader.item(skey) End While tblreader.close() keyvalue = str Return str Catch ex As Exception Return "" End Try End Function 10

11 7.8 FindKeyValue( 尋找鍵值紀錄 ) 用途 : 尋找鍵值是否存在 在新增 修改或刪除紀錄時, 可用來檢查鍵值是否存在 回傳結果 : 布林值 Public Function FindKeyValue(ByVal stbl As String, ByVal srtkey As String) As Boolean If srtkey Is Nothing Then Return False Exit Function Try Dim str As String Dim tblreader As OdbcDataReader str = "Select * From " & stbl & " Where " & srtkey mycmd = New OdbcCommand(str, mycon) tblreader = mycmd.executereader FindKeyValue = tblreader.read() tblreader.close() Return FindKeyValue Catch ex As Exception MsgBox(ex.Message) Return False End Try End Function 11

12 7.9 FindPrimaryKey( 尋找主鍵 ) 用途 : 尋找資料表主鍵 開啟資料表後, 可用此程序來設定資料表之主鍵 回傳結果 : 字串, 若為雙主鍵, 則以逗號間隔兩個鍵值欄 Public Function FindPrimaryKey(ByVal strtbl As String) As String Try Dim strsql As String, str As String Dim key1 As String, key2 As String, fna As String Dim tblreader As OdbcDataReader If strtbl = "" Then Return "" Exit Function strsql = "Describe " & strtbl & ";" 說明 :MySQL 指令, 可用來查閱資料表結構 mycmd = New OdbcCommand(strSQL, mycon) tblreader = mycmd.executereader key1 = "" key2 = "" While tblreader.read fna = tblreader.item(0).tostring str = tblreader.item(3).tostring If InStr(str, "PRI") > 0 Then, 說明 :PRI 代表鍵值欄 If key1 = "" Then key1 = fna If key2 = "" Then key2 = fna Exit While End While If key1 <> "" Then If key2 <> "" Then key1 = key1 &","& key2 12

13 tblreader.close() Return key1 Catch ex As Exception MsgBox(ex.Message) Return "" End Try End Function 13

14 7.10 LockTable( 資料表上鎖 ) 用途 : 資料表上鎖, 當需要異動紀錄時, 資料表需要上鎖 說明 : 傳入資料表和鎖表方式兩個引數 回傳結果 : 布林值 Public Function LockTable(ByVal stbl As String, ByVal stp As String) As Boolean Try Dim cmd As String If stp = "" Or stp = "Write" Then cmd = "LOCK TABLE "& stbl &" Write;" cmd = "LOCK TABLE "& stbl &" Read;" mycmd = New OdbcCommand(cmd, mycon) mycmd.executenonquery() Return True Catch ex As Exception Return False End Try End Function 14

15 7.11 UnlockTable( 資料表解鎖 ) 用途 : 資料表解鎖, 異動紀錄後, 必須將資料表解鎖 Public Sub UnlockTable() Try Dim cmd As String cmd = "Unlock TABLES;" mycmd = New OdbcCommand(cmd, mycon) mycmd.executenonquery() Catch ex As Exception End Try End Sub 15

16 7.12 InsertNewRecord( 新增紀錄 ) 用途 : 新增紀錄 說明 : 新增紀錄表單輸入之資料可先存放在公用資料表結構體變數 tblstruct /tblstruct2 內, 然後叫用此函數將資料存入資料庫 引數 id 值 1 表主資料表 ( 使用公用變數 wktbl), 值 2 表子表 ( 使用公用變數 wktbl2) 引數 kv1 表第一過濾條件,kv2 表第二過濾條件 回傳結果 : 布林值 Public Function InsertNewRecord(ByVal id As Integer, ByVal kv1 As String, ByVal kv2 As String) As Boolean Try Dim str As String, fn As Integer, i As Integer, ftp As String = "" Dim vl If id = 1 Then fn = UBound(tblStruct) str = "Insert Into " & wktbl & " (", 說明 : 設定 Insert Into 指令 For i = 0 To fn, 說明 : 此迴圈用於組合欄名 ftp = tblstruct(i).fldtype If tblstruct(i).fldencrypt = False Then If ftp <> "Stamp" And ftp <> "BLOB" And ftp <> "Binary" Then str = str & tblstruct(i).fldname & "," str = str & tblstruct(i).fldname & "," Next If Mid(str, Len(str), 1) = "," Then str = (Mid(str, 1, Len(str) - 1)) str = str &") Values (" For i = 0 To fn 說明 : 此迴圈用於取出欄值, 並依型態別來組合成 SQL 指令 ftp = tblstruct(i).fldtype If tblstruct(i).fldencrypt = False Then If ftp <> "Stamp" And ftp <> "Binary" And ftp <> "BLOB" Then str = str & tblstruct(i).fldvalue & "," 16

17 If tblenckey1 <> "" Then vl = tblstruct(i).fldvalue vl = SysEncrypt & "(" & vl & ",'" & tblenckey1 & "')" str = str & vl &"," str = str & tblstruct(i).fldvalue & "," Next If Mid(str, Len(str), 1) = "," Then str = (Mid(str, 1, Len(str) - 1)) str = str &")" 說明 : 以下為子表程序 fn = UBound(tblStruct2) str = "Insert Into " & wktbl2 & " (" For i = 0 To fn ftp = tblstruct2(i).fldtype If tblstruct2(i).fldencrypt = False Then If ftp <> "Stamp" And ftp <> "Binary" And ftp <> "BLOB" Then str = str & tblstruct2(i).fldname & "," str = str & tblstruct2(i).fldname & "," Next If Mid(str, Len(str), 1) = "," Then str = (Mid(str, 1, Len(str) - 1)) str = str &") Values (" For i = 0 To fn ftp = tblstruct2(i).fldtype If tblstruct2(i).fldencrypt = False Then If ftp <> "Stamp" And ftp <> "Binary" And ftp <> "BLOB" Then str = str & tblstruct2(i).fldvalue & "," If tblenckey2 <> "" Then vl = tblstruct2(i).fldvalue vl = SysEncrypt &"("& vl &",'"& tblenckey2 &"')" 17

18 str = str & vl &"," str = str & tblstruct2(i).fldvalue & "," Next If Mid(str, Len(str), 1) = "," Then str = (Mid(str, 1, Len(str) - 1)) str = str &")" If id = 1 Then If LockTable(wkTBL, "Write") = False Then Return False Exit Function If LockTable(wkTBL2, "Write") = False Then Return False Exit Function mycmd = New OdbcCommand(str, mycon) mycmd.executenonquery() Call UnlockTable() Return True Catch ex As Exception MsgBox(ex.Message) Return False End Try End Function 18

19 7.13 UpdateNewRecord( 更新紀錄 ) 用途 : 更新紀錄 說明 : 更新紀錄表單修改之資料可先存放在公用資料表結構體變數 tblstruct /tblstruct2 內, 然後叫用此函數將資料存入資料庫 引數 id 值 1 表主資 料表 ( 使用公用變數 wktbl), 值 2 表子表 ( 使用公用變數 wktbl2) 引數 kv1 表第一過濾條件,kv2 表第二過濾條件 回傳結果 : 布林值 Public Function UpdateNewRecord(ByVal id As Integer, ByVal kv1 As String, ByVal kv2 As String) As Boolean Try Dim str As String, fn As Integer, i As Integer, ftp As String = "" Dim vl If id = 1 Then fn = UBound(tblStruct) str = "Update " & wktbl & " Set " 說明 : 設定 Update 指令 For i = 0 To fn 說明 : 此迴圈用於取出欄值, 並依型態別來組合成 SQL 指令 ftp = tblstruct(i).fldtype vl = tblstruct(i).fldvalue If tblstruct(i).fldencrypt = False Then If ftp <> "Stamp" And ftp <> "BLOB" And ftp <> "Binary" Then str = str & tblstruct(i).fldname & "=" & vl & "," If tblenckey1 <> "" Then vl = SysEncrypt & "(" & vl & ",'" & tblenckey1 & "')" str = str & tblstruct(i).fldname & "=" & vl & "," str = str & tblstruct(i).fldname & "=" & vl & "," Next If Mid(str, Len(str), 1) = "," Then str = (Mid(str, 1, Len(str) - 1)) If keyfield1 <> "" Then 19

20 str = str &" Where "& kv1 If keyfield2 <> "" Then str = str & " And " & kv2 說明 :keyfield1 和 keyfield2 為公用變數, 表主資料表之鍵值欄 說明 : 以下為子表程序 fn = UBound(tblStruct2) str = "Update " & wktbl2 & " Set " For i = 0 To fn ftp = tblstruct2(i).fldtype vl = tblstruct2(i).fldvalue If tblstruct2(i).fldencrypt = False Then If ftp <> "Stamp" And ftp <> "BLOB" And ftp <> "Binary" Then str = str & tblstruct2(i).fldname & "=" & vl & "," If tblenckey2 <> "" Then vl = SysEncrypt & "(" & vl & ",'" & tblenckey2 & "')" str = str & tblstruct2(i).fldname & "=" & vl & "," str = str & tblstruct2(i).fldnam & "=" & vl & "," Next If Mid(str, Len(str), 1) = "," Then str = (Mid(str, 1, Len(str) - 1)) If ckeyfield1 <> "" Then str = str &" Where "& kv1 If ckeyfield2 <> "" Then str = str & " And " & kv2 說明 :ckeyfield1 和 ckeyfield2 為公用變數, 表子資料表之鍵值欄 If id = 1 Then If LockTable(wkTBL, "Write") = False Then Return False Exit Function 20

21 If LockTable(wkTBL2, "Write") = False Then 說明 : 上鎖失敗則直接返回 Return False Exit Function 說明 : 執行新增或更新 SQL 指令 mycmd = New OdbcCommand(str, mycon) mycmd.executenonquery() 說明 : 資料表解鎖 Call UnlockTable() Return True Catch ex As Exception MsgBox(ex.Message) Return False End Try End Function 21

22 7.14 DeleteKeyValue( 刪除紀錄 ) 用途 : 依指定鍵值刪除紀錄 說明 : 傳入資料表和過濾條件兩個引數 回傳結果 : 布林值 Public Function DeleteKeyValue(ByVal stbl As String, ByVal srtkey As String) As Boolean If srtkey Is Nothing Then Return False Exit Function Try If LockTable(sTbl, "Write") = False Then 說明 : 上鎖失敗則直接返回 Return False Exit Function Dim str As String str = "Delete From " & stbl & " Where " & srtkey 說明 : 設定 Delete SQL 指令 mycmd = New OdbcCommand(str, mycon) mycmd.executenonquery() 說明 : 資料表解鎖 Call UnlockTable() Return True Catch ex As Exception MsgBox(ex.Message) Return False End Try End Function 22

23 7.15 GetTableStructure( 取得資料表結構 ) 用途 : 設定資料表結構體變數內容 Public Sub gettablestructure(byval strtbl As String, ByVal id As Integer) Try '*** id=0 不設 Primary Field, 1 : 主鍵, 2 : 子鍵 Dim strsql As String, str As String, fl As Integer, sl As Integer, ml As Integer, ei As Integer Dim i As Integer = 0, fln As Integer Dim key1 As String, key2 As String Dim tblstr() As TableStruct Dim tblreader As OdbcDataReader Dim envl() Dim ln As Integer If strtbl = "" Then Exit Sub strsql = "Describe " & strtbl & ";" mycmd = New OdbcCommand(strSQL, mycon) tblreader = mycmd.executereader 說明 : 重設變數值 key1 = "" key2 = "" If id = 1 Then keyfield1 = "" keyfield2 = "" tblenckey1 = "" wktbl = strtbl If id = 2 Then ckeyfield1 = "" ckeyfield2 = "" tblenckey2 = "" wktbl2 = strtbl 說明 : 逐筆讀取介面設定值並轉入結構體變數 While tblreader.read 23

24 ReDim Preserve tblstr(i) tblstr(i).fldname = tblreader.item(0).tostring tblstr(i).fldtitle = tblstr(i).fldname tblstr(i).fldlength = 10 tblstr(i).fldnull = True tblstr(i).fldprimary = False tblstr(i).flddefault = "" tblstr(i).fldenum = "" str = LCase(tblReader.Item(1).ToString) ln = 0 說明 : 以下程式依欄位型態來設值 If InStr(str, "int") > 0 Then tblstr(i).fldtype = "Numeric" If InStr(str, "decimal") > 0 Then tblstr(i).fldtype = "Numeric" ln = 2 If InStr(str, "float") > 0 Then tblstr(i).fldtype = "Numeric" ln = 2 If InStr(str, "double") > 0 Then tblstr(i).fldtype = "Numeric" ln = 2 If InStr(str, "real") > 0 Then tblstr(i).fldtype = "Numeric" ln = 2 If InStr(str, "tinyint(1)") > 0 Then tblstr(i).fldtype = "Boolean" If InStr(str, "char") > 0 Or InStr(str, "var") > 0 Then If InStr(str, "varbinary") > 0 Then tblstr(i).fldtype = "Binary" tblstr(i).fldtype = "String" fl = 0 24

25 sl = 0 If InStr(str, "(") > 0 Then fl = InStr(str, "(") sl = InStr(str, ")") tblstr(i).fldlength = Val(Mid(str, fl + 1, (sl - fl - 1))) + ln If InStr(str, "enum") > 0 Then tblstr(i).fldtype = "Enum" tblstr(i).fldlength = 10 fl = InStr(str, "(") sl = InStr(str, ")") tblstr(i).fldenum = Mid(str, fl + 1, sl - fl - 1) envl = Split(tblSTR(i).fldEnum, ",") ml = 0 For ei = 0 To UBound(enVL) If LenUstr(enVL(ei)) > ml Then ml = LenUstr(enVL(ei)) Next tblstr(i).fldlength = ml If InStr(str, "date") > 0 Then tblstr(i).fldtype = "Date" If InStr(str, "timestamp") > 0 Then tblstr(i).fldtype = "Stamp" tblstr(i).fldlength = 24 If InStr(str, "text") > 0 Then tblstr(i).fldtype = "Text" If InStr(str, "blob") > 0 Then tblstr(i).fldtype = "Blob" str = tblreader.item(2).tostring If str = "No" Then tblstr(i).fldnull = False str = tblreader.item(3).tostring 說明 : 檢查是否為主鍵欄 If InStr(str, "PRI") > 0 Then tblstr(i).fldprimary = True If key1 = "" Then 25

26 key1 = tblstr(i).fldname If key2 = "" Then key2 = tblstr(i).fldname If tblstr(i).fldtype = "Stamp" Or tblstr(i).fldtype = "Date" Then tblstr(i).flddefault = "" tblstr(i).flddefault = tblreader.item(4).tostring If id = 1 Then ReDim Preserve tblstruct(i) tblstruct(i) = tblstr(i) ReDim Preserve tblstruct2(i) tblstruct2(i) = tblstr(i) i = i + 1 End While tblreader.close() fln = i - 1 If id = 1 Then keyfield1 = key1 keyfield2 = key2 If id = 2 Then ckeyfield1 = key1 ckeyfield2 = key2 If ismytable(wdb, "TableDef") = True Then Call gettabledef(strtbl), 說明 : 取得中文介面屬性 If Not tbldef Is Nothing Then EncTBL1 = False If id = 1 Then 26

27 For i = 0 To UBound(tblStruct) For id = 0 To UBound(tblDEF) If tbldef(id).fldname = tblstruct(i).fldname Then If tbldef(id).fldtitle <> "" Then tblstruct(i).fldtitle = tbldef(id).fldtitle, 說明 : 欄位抬頭 If tbldef(id).flddefault <> "" Then tblstruct(i).flddefault = tbldef(id).flddefault, 說明 : 介面預設值 tblstruct(i).fldimemode =tbldef(id).fldimemode, 說明 : 輸入法 If tbldef(id).fldencrypt = True Then EncTBL1 = True 說明 : 檢查是否需要加密 tblstruct(i).tblsource = tbldef(id).tblsource, 說明 : 參考資料表 tblstruct(i).fldsource = tbldef(id).fldsource, 說明 : 參考欄位 Exit For Next Next 說明 : 以下程序用於設定子表介面屬性 EncTBL2 = False For i = 0 To UBound(tblStruct2) For id = 0 To UBound(tblDEF) If tbldef(id).fldname = tblstruct2(i).fldname Then If tbldef(id).fldtitle <> "" Then tblstruct2(i).fldtitle = tbldef(id).fldtitle If tbldef(id).flddefault <> "" Then tblstruct2(i).flddefault = tbldef(id).flddefault tblstruct2(i).fldimemode = tbldef(id).fldimemode If tbldef(id).fldencrypt = True Then EncTBL2 = True tblstruct2(i).tblsource = tbldef(id).tblsource tblstruct2(i).fldsource = tbldef(id).fldsource Exit For Next Next 27

28 Catch ex As Exception MsgBox(ex.Message) End Try End Sub 28

29 課後習題 1. 公用副程式之主要用途為何? 2. 如何搜尋指定鍵值之紀錄? 詳述程式設計要領 3. 詳述系統內變數傳遞的方法 4. 何謂傳值法? 何謂傳參考法? 有何異同處? 5. 如何宣告一個結構體變數? 回目錄 29

投影片 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

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

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

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

穨文件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

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

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

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

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

<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

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

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

More information

目錄

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

More information

VB2005序列 資料庫處理指令

VB2005序列 資料庫處理指令 6.1 VB200X 序列資料庫物件關聯圖 2 6.2 引入資料處理類別 4 6.3 建立連線 4 6.3.1 屬性說明 5 6.3.2 選項參數說明 5 6.3.3 相關語法 6 6.4 資料處理 6 6.4.1 執行 SQL 指令 6 6.4.2 讀取資料表紀錄 7 6.4.3 使用 ADODB 類別與方法讀取紀錄 7 6.4.4 表列紀錄 9 6.4.5 DataGridView 常用屬性 11

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

Microsoft Word - 01.DOC

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

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

第九章 應用系統開發

第九章 應用系統開發 9.1 啟動伺服器 2 9.2 停止伺服器 3 9.3 執行緒管理 3 9.4 系統參數管理 4 9.4.1 系統變數 4 9.4.2 修改變數 5 9.4.3 修改 my.ini 定義檔 5 9.5 日誌檔 5 9.6 備用伺服器 8 9.6.1 啟用 8 9.6.2 停用 8 9.6.3 重設 8 9.6.4 載入資料 9 9.7 變更主機 9 回目錄 1 主機管理功能, 包括啟動伺服器 停止伺服器

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

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 Database System Principle Database System Principle 1 SQL 3.1 SQL 3.2-3.3 3.4 3.5 3.6 Database System Principle 2 3.1 SQL SQL Structured Query Language SQL Database System Principle 3 SQL 3.1.1 SQL 3.1.2

More information

新・解きながら学ぶJava

新・解きながら学ぶJava 481! 41, 74!= 40, 270 " 4 % 23, 25 %% 121 %c 425 %d 121 %o 121 %x 121 & 199 && 48 ' 81, 425 ( ) 14, 17 ( ) 128 ( ) 183 * 23 */ 3, 390 ++ 79 ++ 80 += 93 + 22 + 23 + 279 + 14 + 124 + 7, 148, 16 -- 79 --

More information

1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET NET Framework.NET Framework 2.0 ( 3 ).NET Framework 2.0.NET F

1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET NET Framework.NET Framework 2.0 ( 3 ).NET Framework 2.0.NET F 1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET 2.0 2.0.NET Framework.NET Framework 2.0 ( 3).NET Framework 2.0.NET Framework ( System ) o o o o o o Boxing UnBoxing() o

More information

untitled

untitled 1 Outline 數 料 數 數 列 亂數 練 數 數 數 來 數 數 來 數 料 利 料 來 數 A-Z a-z _ () 不 數 0-9 數 不 數 SCHOOL School school 數 讀 school_name schoolname 易 不 C# my name 7_eleven B&Q new C# (1) public protected private params override

More information

Microsoft Word - 2CA13內文.doc

Microsoft Word - 2CA13內文.doc 006 公 民 - 歷 屆 試 題 全 解 答 案 是 完 全 正 確 的? : 能 源 使 用 愈 多, 除 了 帶 來 經 濟 成 長 外, 相 對 的, 也 會 帶 來 負 面 的 環 保 問 題 我 們 在 發 展 經 濟 的 過 程 中, 若 不 能 兼 顧 環 境 資 源 的 保 育, 將 賠 上 後 代 子 孫 的 生 存 環 境, 這 是 下 列 那 一 種 理 念? 比 較 利 益

More information

CHAPTER VC#

CHAPTER VC# 1. 2. 3. 4. CHAPTER 2-1 2-2 2-3 2-4 VC# 2-5 2-6 2-7 2-8 Visual C# 2008 2-1 Visual C# 0~100 (-32768~+32767) 2 4 VC# (Overflow) 2-1 2-2 2-1 2-1.1 2-1 1 10 10!(1 10) 2-3 Visual C# 2008 10! 32767 short( )

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

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

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

主程式 : 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

<4D F736F F D DA5BFA6A1C476C1C92DBEC7ACECB8D5A8F728B57BB35D292E646F63>

<4D F736F F D DA5BFA6A1C476C1C92DBEC7ACECB8D5A8F728B57BB35D292E646F63> 全國高級中等學校 106 學年度商業類科學生技藝競賽 程式設計 職種 學科 試卷 選手證號碼 ( 崗位編號 ): 姓名 : 注意事項 : 請將答案劃記於答案卡, 未依規定劃記者不予計分 試題說明 :( 選擇題共 25 題每題 4 分, 答錯不倒扣, 共 100 分 ) ( )1. 執行以下 Visual Basic 程式片段, 其結果為何?(A) 15 (B) 12 (C) 7 (D) 3 Dim

More information

PowerPoint Presentation

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

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

學 科 100% ( 為 單 複 選 題, 每 題 2.5 分, 共 100 分 ) 1. 請 參 閱 附 圖 作 答 : (A) 選 項 A (B) 選 項 B (C) 選 項 C (D) 選 項 D Ans:D 2. 下 列 對 於 資 料 庫 正 規 化 (Normalization) 的 敘

學 科 100% ( 為 單 複 選 題, 每 題 2.5 分, 共 100 分 ) 1. 請 參 閱 附 圖 作 答 : (A) 選 項 A (B) 選 項 B (C) 選 項 C (D) 選 項 D Ans:D 2. 下 列 對 於 資 料 庫 正 規 化 (Normalization) 的 敘 ITE 資 訊 專 業 人 員 鑑 定 資 料 庫 系 統 開 發 與 設 計 實 務 試 卷 編 號 :IDS101 注 意 事 項 一 本 測 驗 為 單 面 印 刷 試 題, 共 計 十 三 頁 第 二 至 十 三 頁 為 四 十 道 學 科 試 題, 測 驗 時 間 90 分 鐘 : 每 題 2.5 分, 總 測 驗 時 間 為 90 分 鐘 二 執 行 CSF 測 驗 系 統 -Client

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 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

第九章 應用系統開發

第九章 應用系統開發 11.1 資料庫 3 11.1.1 目錄 3 11.1.2 新增資料庫 6 11.1.3 刪除資料庫 6 11.1.4 備份資料庫 6 11.1.5 重載資料庫 8 11.1.6 檢視資料庫 9 11.1.7 查閱現狀 10 11.1.8 匯出定義 11 11.1.9 轉換 Access 14 11.2 資料表 15 11.2.1 查閱 16 11.2.2 新增 16 11.2.3 複製 18 11.2.4

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

四川省普通高等学校

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

More information

2010年3月计算机等级考试四级网络工程师笔试

2010年3月计算机等级考试四级网络工程师笔试 计 算 机 二 级 VB 经 典 预 测 题 下 列 各 题 A) B) C) D) 四 个 选 项 中, 只 有 一 个 选 项 是 正 确 的 请 将 正 确 选 项 填 涂 在 答 题 卡 相 应 位 置 上, 答 在 试 卷 上 不 得 分 (1) 下 列 叙 述 中 正 确 的 是 ( ) A) 循 环 队 列 是 队 列 的 一 种 链 式 存 储 结 构 B) 循 环 队 列 是 队

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

ebook 165-5

ebook 165-5 3 5 6 7 8 9 [ 3. 3 ] 3. 3 S Q L S Q 4. 21 S Q L S Q L 4 S Q 5 5.1 3 ( ) 78 5-1 3-8 - r e l a t i o n t u p l e c a r d i n a l i t y a t t r i b u t e d e g r e e d o m a i n primary key 5-1 3 5-1 S #

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

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

1-1 database columnrow record field 不 DBMS Access Paradox SQL Server Linux MySQL Oracle IBM Informix IBM DB2 Sybase 1-2

1-1 database columnrow record field 不 DBMS Access Paradox SQL Server Linux MySQL Oracle IBM Informix IBM DB2 Sybase 1-2 CHAPTER 1 Understanding Core Database Concepts 1-1 database columnrow record field 不 DBMS Access Paradox SQL Server Linux MySQL Oracle IBM Informix IBM DB2 Sybase 1-2 1 Understanding Core Database Concepts

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

Microsoft Word - 第3章.doc

Microsoft Word - 第3章.doc Java C++ Pascal C# C# if if if for while do while foreach while do while C# 3.1.1 ; 3-1 ischeck Test() While ischeck while static bool ischeck = true; public static void Test() while (ischeck) ; ischeck

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

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

untitled

untitled 1-1 1-2 1-3 1-4 1-5 1-6 1-7 1-8 1-1-1 C int main(void){ int x,y,z; int sum=0; double avg=0.0; scanf("%d",&x) ; scanf("%d",&y) ; scanf("%d",&z) ; sum=x+y+z ; avg=sum/3.0; printf("%f\n",avg); system("pause");

More information

C/C++ - 函数

C/C++ - 函数 C/C++ Table of contents 1. 2. 3. & 4. 5. 1 2 3 # include # define SIZE 50 int main ( void ) { float list [ SIZE ]; readlist (list, SIZE ); sort (list, SIZE ); average (list, SIZE ); bargragh

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

新版 明解C++入門編

新版 明解C++入門編 511!... 43, 85!=... 42 "... 118 " "... 337 " "... 8, 290 #... 71 #... 413 #define... 128, 236, 413 #endif... 412 #ifndef... 412 #if... 412 #include... 6, 337 #undef... 413 %... 23, 27 %=... 97 &... 243,

More information

第20章 AspDoMySQL

第20章 AspDoMySQL 第四章 系統程式說明 第四章 系統程式說明 4.1 類別與屬性欄 2 4.2 Interface 類別 6 4.3 ShowData 類別 9 4.4 ImportData 類別 12 4.5 ExportData 類別 14 4.6 UpdateData 類別 16 4.7 GraphicData 類別 19 4.8 Utility 類別 20 4.9 介面參數 21 4.10 介面程式應用範例

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

概述

概述 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

穨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

科学计算的语言-FORTRAN95

科学计算的语言-FORTRAN95 科 学 计 算 的 语 言 -FORTRAN95 目 录 第 一 篇 闲 话 第 1 章 目 的 是 计 算 第 2 章 FORTRAN95 如 何 描 述 计 算 第 3 章 FORTRAN 的 编 译 系 统 第 二 篇 计 算 的 叙 述 第 4 章 FORTRAN95 语 言 的 形 貌 第 5 章 准 备 数 据 第 6 章 构 造 数 据 第 7 章 声 明 数 据 第 8 章 构 造

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 49 [P.51] C/C++ [P.52] [P.53] [P.55] (int) [P.57] (float/double) [P.58] printf scanf [P.59] [P.61] ( / ) [P.62] (char) [P.65] : +-*/% [P.67] : = [P.68] : ,

More information

Chapter 16 集合

Chapter 16 集合 Chapter 16 集合 20 ArrayList StringCollection 16 本章學習目標 : ArrayList ArrayList Array StringCollection 16-1 21 10-3-8 System.Array Clear Clear 16-1 Clear System.Array Microsoft System.Collection IList 542

More information

目 錄 第 一 章 weberp 簡 介... 6 第 一 節 概 述... 6 第 二 節 安 全 性... 7 第 三 節 功 能... 7 一 銷 售 及 訂 單... 7 二 稅... 8 三 應 收 帳 款... 8 四 存 貨... 8 五 購 買... 9 六 應 付 帳 款... 9

目 錄 第 一 章 weberp 簡 介... 6 第 一 節 概 述... 6 第 二 節 安 全 性... 7 第 三 節 功 能... 7 一 銷 售 及 訂 單... 7 二 稅... 8 三 應 收 帳 款... 8 四 存 貨... 8 五 購 買... 9 六 應 付 帳 款... 9 東 吳 大 學 企 研 所 資 訊 管 理 期 末 報 告 weberp 使 用 說 明 書 指 導 教 授 : 尚 榮 安 教 授 第 一 組 童 偉 哲 01353025 劉 彥 澧 01353028 史 璦 禎 01353031 吳 采 紋 98153143 1 目 錄 第 一 章 weberp 簡 介... 6 第 一 節 概 述... 6 第 二 節 安 全 性... 7 第 三 節 功

More information

9, : Java 19., [4 ]. 3 Apla2Java Apla PAR,Apla2Java Apla Java.,Apla,,, 1. 1 Apla Apla A[J ] Get elem (set A) A J A B Intersection(set A,set B) A B A B

9, : Java 19., [4 ]. 3 Apla2Java Apla PAR,Apla2Java Apla Java.,Apla,,, 1. 1 Apla Apla A[J ] Get elem (set A) A J A B Intersection(set A,set B) A B A B 25 9 2008 9 M ICROEL ECTRON ICS & COMPU TER Vol. 25 No. 9 September 2008 J ava 1,2, 1,2, 1,2 (1, 330022 ; 2, 330022) :,. Apla - Java,,.. : PAR ;Apla - Java ; ;CMP ; : TP311 : A : 1000-7180 (2008) 09-0018

More information

Oracle高级复制配置手册_业务广告_.doc

Oracle高级复制配置手册_业务广告_.doc Oracle 高 级 复 制 配 置 手 册 作 者 : 铁 钉 Q Q: 5979404 MSN: nail.cn@msn.com Mail: nail.cn@msn.com Blog: http://nails.blog.51cto.com Materialized View Replication 复 制 模 式 实 现 了 单 主 机 对 多 个 复 制 站 点 的 数 据 同 步. 在 主

More information

VB2005序列 資料庫處理指令

VB2005序列 資料庫處理指令 5.1 VB200X 序列資料庫物件關聯圖 2 5.2 引入資料處理類別 3 5.3 建立連線 3 5.4 資料處理 3 5.4.1 執行 SQL 指令 3 5.4.2 讀取資料表紀錄 4 5.4.3 使用 ADODB 類別與方法讀取紀錄 4 5.4.4 表列紀錄 6 5.4.5 DataGridView 常用屬性 8 5.4.6 動態設定 DataGridView 表格及加入資料 9 5.4.7

More information

1 4 1.1 4 1.2..4 2..4 2.1..4 3.4 3.1 Java.5 3.1.1..5 3.1.2 5 3.1.3 6 4.6 4.1 6 4.2.6 5 7 5.1..8 5.1.1 8 5.1.2..8 5.1.3..8 5.1.4..9 5.2..9 6.10 6.1.10

1 4 1.1 4 1.2..4 2..4 2.1..4 3.4 3.1 Java.5 3.1.1..5 3.1.2 5 3.1.3 6 4.6 4.1 6 4.2.6 5 7 5.1..8 5.1.1 8 5.1.2..8 5.1.3..8 5.1.4..9 5.2..9 6.10 6.1.10 Java V1.0.1 2007 4 10 1 4 1.1 4 1.2..4 2..4 2.1..4 3.4 3.1 Java.5 3.1.1..5 3.1.2 5 3.1.3 6 4.6 4.1 6 4.2.6 5 7 5.1..8 5.1.1 8 5.1.2..8 5.1.3..8 5.1.4..9 5.2..9 6.10 6.1.10 6.2.10 6.3..10 6.4 11 7.12 7.1

More information

Socket Socket TcpClient Socket.Connect TcpClient.Connect Socket.Send / Receive NetworkStream 6-5

Socket Socket TcpClient Socket.Connect TcpClient.Connect Socket.Send / Receive NetworkStream 6-5 6 6-1 6-2 Socket 6-2-1 Socket 6-2-2 TcpClient 6-3 6-3-1 Socket.Connect 6-3-2 TcpClient.Connect 6-4 6-4-1 Socket.Send / Receive 6-4-2 NetworkStream 6-5 6-5-1 Socket.Close 6-5-2 TcpClient.Close 6-6 DateTime

More information

TwinCAT 1. TwinCAT TwinCAT PLC PLC IEC TwinCAT TwinCAT Masc

TwinCAT 1. TwinCAT TwinCAT PLC PLC IEC TwinCAT TwinCAT Masc TwinCAT 2001.12.11 TwinCAT 1. TwinCAT... 3 2.... 4... 4...11 3. TwinCAT PLC... 13... 13 PLC IEC 61131-3... 14 4. TwinCAT... 17... 17 5. TwinCAT... 18... 18 6.... 19 Maschine.pro... 19... 27 7.... 31...

More information

目錄 C ontents Chapter MTA Chapter Chapter

目錄 C ontents Chapter MTA Chapter Chapter 目錄 C ontents Chapter 01 1-1 MTA...1-2 1-2...1-3 1-3...1-5 1-4...1-10 Chapter 02 2-1...2-2 2-2...2-3 2-3...2-7 2-4...2-11...2-16 Chapter 03 3-1...3-2 3-2...3-8 3-3 views...3-16 3-4...3-24...3-33 Chapter

More information

未命名

未命名 附录三 ADS- MySQL 基础语法偏表 类别语法偏类 MySQL 语法 ADS 语法备注 型 Utility DESCRIBE {DESCRIBE DESC} tbl_name [col_name wild] {DESCRIBE DESC} dbname.tbl_name EXPLAIN 负偏 {EXPLAIN} [explain_type] explainable_stmt {EXPLAIN}

More information

数 据 库 系 统 基 础 2/54 第 6 章 数 据 库 管 理 与 维 护

数 据 库 系 统 基 础 2/54 第 6 章 数 据 库 管 理 与 维 护 数 据 库 系 统 基 础 1/54 数 据 库 系 统 基 础 哈 尔 滨 工 业 大 学 2011.~2012. 数 据 库 系 统 基 础 2/54 第 6 章 数 据 库 管 理 与 维 护 数 据 库 系 统 基 础 3/54 第 6 章 数 据 库 管 理 与 维 护 6.1 数 据 库 管 理 员 的 基 本 职 责 6.2 数 据 库 存 储 与 性 能 管 理 6.3 数 据 库

More information

CHAPTER 1

CHAPTER 1 CHAPTER 1 1-1 System Development Life Cycle; SDLC SDLC Waterfall Model Shelly 1995 1. Preliminary Investigation 2. System Analysis 3. System Design 4. System Development 5. System Implementation and Evaluation

More information

第一章 章标题-F2 上空24,下空24

第一章 章标题-F2 上空24,下空24 Web 9 XML.NET Web Web Service Web Service Web Service Web Service Web Service ASP.NET Session Application SOAP Web Service 9.1 Web Web.NET Web Service Web SOAP Simple Object Access Protocol 9.1.1 Web Web

More information

C/C++程序设计 - 字符串与格式化输入/输出

C/C++程序设计 - 字符串与格式化输入/输出 C/C++ / Table of contents 1. 2. 3. 4. 1 i # include # include // density of human body : 1. 04 e3 kg / m ^3 # define DENSITY 1. 04 e3 int main ( void ) { float weight, volume ; int

More information

PPBSalesDB.doc

PPBSalesDB.doc Pocket PowerBuilder SalesDB Pocket PowerBuilder PDA Pocket PowerBuilder Mobile Solution Pocket PowerBuilder Pocket PowerBuilder C:\Program Files\Sybase\Pocket PowerBuilder 1.0 %PPB% ASA 8.0.2 ASA 9 ASA

More information

C/C++ - 字符输入输出和字符确认

C/C++ - 字符输入输出和字符确认 C/C++ Table of contents 1. 2. getchar() putchar() 3. (Buffer) 4. 5. 6. 7. 8. 1 2 3 1 // pseudo code 2 read a character 3 while there is more input 4 increment character count 5 if a line has been read,

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

多層次傳銷與獎金系統

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

More information

雲端 Cloud Computing 技術指南 運算 應用 平台與架構 10/04/15 11:55:46 INFO 10/04/15 11:55:53 INFO 10/04/15 11:55:56 INFO 10/04/15 11:56:05 INFO 10/04/15 11:56:07 INFO

雲端 Cloud Computing 技術指南 運算 應用 平台與架構 10/04/15 11:55:46 INFO 10/04/15 11:55:53 INFO 10/04/15 11:55:56 INFO 10/04/15 11:56:05 INFO 10/04/15 11:56:07 INFO CHAPTER 使用 Hadoop 打造自己的雲 8 8.3 測試 Hadoop 雲端系統 4 Nodes Hadoop Map Reduce Hadoop WordCount 4 Nodes Hadoop Map/Reduce $HADOOP_HOME /home/ hadoop/hadoop-0.20.2 wordcount echo $ mkdir wordcount $ cd wordcount

More information

Microsoft Word - Functional_Notes_3.90_CN.doc

Microsoft Word - Functional_Notes_3.90_CN.doc GeO-iPlatform Functional Notes GeO Excel Version 3.90 Release Date: December 2008 Copyrights 2007-2008. iplatform Corporation. All rights reserved. No part of this manual may be reproduced in any form

More information

Microsoft PowerPoint - C_Structure.ppt

Microsoft PowerPoint - C_Structure.ppt 結構與其他資料型態 Janet Huang 5-1 結構的宣告 struct 結構名稱 struct 結構名稱變數 1, 變數 2,, 變數 m; struct 結構名稱 變數 1, 變數 2,, 變數 m; student; student; 5-2 1 結構變數初值的設定 struct 結構名稱 struct 結構名稱變數 = 初值 1, 初值 2,, 初值 n student="janet","1350901",100,95

More information

ebook45-5

ebook45-5 5 S Q L SQL Server 5.1 5-1 SQL Server 5-1 A B S A C O S A S I N ATA N AT N 2 C E I L I N G C O S C O T D E G R E E S E X P F L O O R L O G L O G 10 P I P O W E R R A D I A N S R A N D R O U N D S I G N

More information

通过Hive将数据写入到ElasticSearch

通过Hive将数据写入到ElasticSearch 我在 使用 Hive 读取 ElasticSearch 中的数据 文章中介绍了如何使用 Hive 读取 ElasticSearch 中的数据, 本文将接着上文继续介绍如何使用 Hive 将数据写入到 ElasticSearch 中 在使用前同样需要加入 elasticsearch-hadoop-2.3.4.jar 依赖, 具体请参见前文介绍 我们先在 Hive 里面建个名为 iteblog 的表,

More information

C/C++语言 - C/C++数据

C/C++语言 - C/C++数据 C/C++ C/C++ Table of contents 1. 2. 3. 4. char 5. 1 C = 5 (F 32). 9 F C 2 1 // fal2cel. c: Convert Fah temperature to Cel temperature 2 # include < stdio.h> 3 int main ( void ) 4 { 5 float fah, cel ;

More information

Java java.lang.math Java Java.util.Random : ArithmeticException int zero = 0; try { int i= 72 / zero ; }catch (ArithmeticException e ) { // } 0,

Java java.lang.math Java Java.util.Random : ArithmeticException int zero = 0; try { int i= 72 / zero ; }catch (ArithmeticException e ) { // } 0, http://debut.cis.nctu.edu.tw/~chi Java java.lang.math Java Java.util.Random : ArithmeticException int zero = 0; try { int i= 72 / zero ; }catch (ArithmeticException e ) { // } 0, : POSITIVE_INFINITY NEGATIVE_INFINITY

More information

C++ 程式設計

C++ 程式設計 C C 料, 數, - 列 串 理 列 main 數串列 什 pointer) 數, 數, 數 數 省 不 不, 數 (1) 數, 不 數 * 料 * 數 int *int_ptr; char *ch_ptr; float *float_ptr; double *double_ptr; 數 (2) int i=3; int *ptr; ptr=&i; 1000 1012 ptr 數, 數 1004

More information

, 7, Windows,,,, : ,,,, ;,, ( CIP) /,,. : ;, ( 21 ) ISBN : -. TP CIP ( 2005) 1

, 7, Windows,,,, : ,,,, ;,, ( CIP) /,,. : ;, ( 21 ) ISBN : -. TP CIP ( 2005) 1 21 , 7, Windows,,,, : 010-62782989 13501256678 13801310933,,,, ;,, ( CIP) /,,. : ;, 2005. 11 ( 21 ) ISBN 7-81082 - 634-4... - : -. TP316-44 CIP ( 2005) 123583 : : : : 100084 : 010-62776969 : 100044 : 010-51686414

More information

SQL Server SQL Server SQL Mail Windows NT

SQL Server SQL Server SQL Mail Windows NT ... 3 11 SQL Server... 4 11.1... 7 11.2... 9 11.3... 11 11.4... 30 11.5 SQL Server... 30 11.6... 31 11.7... 32 12 SQL Mail... 33 12.1Windows NT... 33 12.2SQL Mail... 34 12.3SQL Mail... 34 12.4 Microsoft

More information

C/C++ - 文件IO

C/C++ - 文件IO C/C++ IO Table of contents 1. 2. 3. 4. 1 C ASCII ASCII ASCII 2 10000 00100111 00010000 31H, 30H, 30H, 30H, 30H 1, 0, 0, 0, 0 ASCII 3 4 5 UNIX ANSI C 5 FILE FILE 6 stdio.h typedef struct { int level ;

More information

(京)新登字063号

(京)新登字063号 教 育 部 职 业 教 育 与 成 人 教 育 司 推 荐 教 材 Java 程 序 设 计 教 程 ( 第 二 版 ) 沈 大 林 主 编 沈 昕 肖 柠 朴 曾 昊 等 编 著 内 容 简 介 Java 是 由 美 国 SUN 公 司 开 发 的 一 种 功 能 强 大 的, 具 有 简 单 面 向 对 象 分 布 式 可 移 植 等 性 能 的 多 线 程 动 态 计 算 机 编 程 语 言

More information

untitled

untitled 1 MSDN Library MSDN Library 量 例 參 列 [ 說 ] [] [ 索 ] [] 來 MSDN Library 了 類 類 利 F1 http://msdn.microsoft.com/library/ http://msdn.microsoft.com/library/cht/ Object object 參 類 都 object 參 object Boxing 參 boxing

More information

<4D F736F F D D342DA57CA7DEA447B14D2DA475B57BBB50BADEB27AC3FEB14DA447B8D5C344>

<4D F736F F D D342DA57CA7DEA447B14D2DA475B57BBB50BADEB27AC3FEB14DA447B8D5C344> 1. 請 問 誰 提 出 積 體 電 路 (IC) 上 可 容 納 的 電 晶 體 數 目, 約 每 隔 24 個 月 (1975 年 更 改 為 18 個 月 ) 便 會 增 加 一 倍, 效 能 也 將 提 升 一 倍, 也 揭 示 了 資 訊 科 技 進 步 的 速 度? (A) 英 特 爾 (Intel) 公 司 創 始 人 戈 登. 摩 爾 (Gordon Moore) (B) 微 軟 (Microsoft)

More information