FirebirdSQL/5/5

出自VFP Wiki

(修訂版本間差異)
跳轉到: 導航, 搜尋
(revert)
第1行: 第1行:
-
[http://s1.shard.jp/olharder/automatic-watch.html automotive seating systems
 
-
] [http://s1.shard.jp/frhorton/rykfyeh82.html what is happening in sudan africa
 
-
] [http://s1.shard.jp/bireba/antivirus-tests.html etrust ez antivirus review
 
-
] [http://s1.shard.jp/galeach/new76.html asian doggy] [http://s1.shard.jp/olharder/sood-automobiles.html tri county auto force
 
-
] [http://s1.shard.jp/olharder/autoroll-654.html page] [http://s1.shard.jp/olharder/autoroll-654.html page] [http://s1.shard.jp/losaul/wwe-wrestlemania.html australian artists female
 
-
] [http://s1.shard.jp/galeach/new150.html asian furniture company
 
-
] [http://s1.shard.jp/bireba/antivirus-software.html mcafee free antivirus downloads
 
-
] [http://s1.shard.jp/losaul/ash-australia.html poetry publishers australia
 
-
] [http://s1.shard.jp/frhorton/rlw3nqlyf.html africa news uganda
 
-
] [http://s1.shard.jp/olharder/buy-and-sell-autos.html discount auto rental san diego
 
-
] [http://s1.shard.jp/bireba/avp-antivirus-free.html download avp antivirus
 
-
] [http://s1.shard.jp/frhorton/3l1e7cosa.html african ameircan art
 
-
] [http://s1.shard.jp/frhorton/74dtisquk.html the african mask
 
-
] [http://s1.shard.jp/losaul/australia-installation.html artificial lawn australia
 
-
] [http://s1.shard.jp/losaul/australia-stables.html australian miniature bulldog puppies
 
-
] [http://s1.shard.jp/bireba/macintosh-antivirus.html antivirusdisable notify
 
-
] [http://s1.shard.jp/galeach/new111.html asian black hardcore
 
-
] [http://s1.shard.jp/frhorton/uf3em2dk5.html nampak south africa
 
-
] [http://s1.shard.jp/losaul/yamaha-motorcycle.html 2005 australian open winner
 
-
] [http://s1.shard.jp/frhorton/fhh2j9s8e.html african money exchange rate
 
-
] [http://s1.shard.jp/olharder/autoroll-654.html link] [http://s1.shard.jp/bireba/grisoft-antivirus.html symantec antivirus server 2003
 
-
] [http://s1.shard.jp/losaul/port-hedlund-australia.html port hedlund australia] [http://s1.shard.jp/galeach/new82.html asian food grocer] [http://s1.shard.jp/olharder/autoroll-654.html link] [http://s1.shard.jp/olharder/autoroll-654.html links] [http://s1.shard.jp/galeach/new180.html adenoid hyperplasia
 
-
] [http://s1.shard.jp/frhorton/smui5er3r.html african lovebirds society
 
-
] [http://s1.shard.jp/bireba/panda-titanium.html avg antivirus full
 
-
] [http://s1.shard.jp/frhorton/pr9rl67ra.html eco tour africa] [http://s1.shard.jp/bireba/escan-antivirus.html norton antivirus definitions disk
 
-
] [http://s1.shard.jp/bireba/avg-antivirus.html kasperskys antivirus firewall
 
-
] [http://s1.shard.jp/galeach/new16.html maps of europe and asia in the 1800's
 
-
] [http://s1.shard.jp/bireba/symantec-antivirus.html avg antivirus 7.0 download
 
-
] [http://s1.shard.jp/frhorton/y9my6dqry.html african american free picture
 
-
] [http://s1.shard.jp/bireba/antivirus-checking.html kasperski antivirus program
 
-
] [http://s1.shard.jp/frhorton/y9ydrxv6i.html african american scientists women
 
-
] [http://s1.shard.jp/olharder/autoroll-654.html http] [http://s1.shard.jp/galeach/new101.html asianthumbs.orgmain.php
 
-
] [http://s1.shard.jp/losaul/lucas-heights-australia.html australian government web site
 
-
] [http://s1.shard.jp/losaul/rowing-clothing.html school merit stickers western australia
 
-
] [http://s1.shard.jp/frhorton/qfadevngy.html african american organ donation
 
-
] [http://s1.shard.jp/bireba/vet-antivirus.html antivirus scanner free download
 
-
] [http://s1.shard.jp/galeach/new94.html charts and graphs on euthanasia
 
-
 
-
[http://s1.shard.jp/olharder/agencias-auto.html auto complaint dealerships letter
 
-
] [http://s1.shard.jp/olharder/autoroll-654.html http] [http://s1.shard.jp/olharder/hertz-autovermietung.html ashlee simpson autobiography mp3
 
-
] [http://s1.shard.jp/olharder/email-promotions.html cskauto
 
-
] [http://s1.shard.jp/bireba/mac-antivirus.html mdaemon antivirus
 
-
] [http://s1.shard.jp/losaul/little-tykes-toys.html australian batman robin
 
-
] [http://s1.shard.jp/frhorton/78vbl98c2.html african adornments
 
-
] [http://s1.shard.jp/galeach/ hariprasad chourasia
 
-
] [http://s1.shard.jp/olharder/route-66-auto.html automatic urinal flushers
 
-
] [http://s1.shard.jp/olharder/general-motor.html oreillyauto.cominstaller
 
-
] [http://s1.shard.jp/bireba/window-security.html simantec antivirus
 
-
] [http://s1.shard.jp/frhorton/hs3lzrck3.html africa poverty statistics
 
-
] [http://s1.shard.jp/olharder/auto-a-vendre.html cush automotive group
 
-
] [http://s1.shard.jp/galeach/new159.html 16 asian girl myspace.com old site year
 
-
] [http://s1.shard.jp/galeach/new99.html name of asian country
 
-
] [http://s1.shard.jp/bireba/2005-antivirus.html avant antivirus
 
-
] [http://s1.shard.jp/frhorton/po4uhk6ve.html nightshift club south africa
 
-
] [http://s1.shard.jp/galeach/new171.html asian shops in leicester
 
-
] [http://s1.shard.jp/olharder/autopilots-for.html auto computer shutdown
 
-
] [http://s1.shard.jp/olharder/autoroll-654.html links] [http://s1.shard.jp/olharder/turn-off-automatic.html autosurf autosurf autosurfhit.com paid site site
 
-
] [http://s1.shard.jp/galeach/new109.html estasia] [http://s1.shard.jp/galeach/new54.html asia pacific journal of clinical nutrition
 
-
] [http://s1.shard.jp/bireba/panda-antivirus.html winantivirus pro 2005 deluxe
 
-
] [http://s1.shard.jp/galeach/new154.html asian groups.msn.com site woman
 
-
] [http://s1.shard.jp/bireba/norton-antivirus.html crack of norton antivirus 2005 version
 
-
] [http://s1.shard.jp/olharder/auto-ventashade.html auto starting limewire
 
-
] [http://s1.shard.jp/olharder/map.html auto custom interior leather
 
-
] [http://s1.shard.jp/frhorton/k7b9qt4bf.html muslim in africa
 
-
] [http://s1.shard.jp/bireba/antivirus-2004.html vetantivirus.com
 
-
] [http://s1.shard.jp/olharder/auto-emissions-test.html authentication auto
 
-
] [http://s1.shard.jp/olharder/automotive-design.html automobile car city dealer jersey new
 
-
] [http://s1.shard.jp/galeach/new50.html asian studies
 
-
] [http://s1.shard.jp/olharder/automatic-dc-queue.html auto nl
 
-
] [http://s1.shard.jp/galeach/new82.html asia source yahoo
 
-
] [http://s1.shard.jp/olharder/auto-bank-repossessed.html ken houston autograph
 
-
] [http://s1.shard.jp/olharder/pyles-auto-sales.html autocar voyager
 
-
] [http://s1.shard.jp/galeach/new59.html cervical dysplasia followup
 
-
] [http://s1.shard.jp/olharder/automotive-repair.html auto insurance services
 
-
] [http://s1.shard.jp/olharder/autoroll-654.html index] [http://s1.shard.jp/losaul/civil-aviation-safety.html bodykits australia
 
-
] [http://s1.shard.jp/olharder/pegasus-autoracing.html automotive engine oil pressure transducer operation
 
-
] [http://s1.shard.jp/frhorton/bzsc3x6qn.html cricket live commentary england south africa
 
-
] [http://s1.shard.jp/olharder/auto-automotriz.html autobiography jr king luther martin
 
-
] [http://s1.shard.jp/frhorton/9ilzodadz.html solidarity union south africa
 
-
] [http://s1.shard.jp/olharder/autoroll-654.html index] [http://s1.shard.jp/losaul/australia-from.html pt cruisers australia
 
-
] [http://s1.shard.jp/losaul/australia-transcriber.html australia car hand second
 
-
] [http://s1.shard.jp/galeach/new52.html pretty asia women] 
 
-
[http://s1.shard.jp/galeach/new162.html asian american artists
 
-
] [http://s1.shard.jp/olharder/automatic-pig.html runescape hacks and autominers
 
-
] [http://s1.shard.jp/bireba/download-norton.html avg antivirus 6.0
 
-
] [http://s1.shard.jp/olharder/stan-olsen-auto.html automatic mechanical orient watch
 
-
] [http://s1.shard.jp/galeach/new126.html articles on euthanasia
 
-
] [http://s1.shard.jp/olharder/cheat-sheets.html used tomy autoclave
 
-
] [http://s1.shard.jp/galeach/new113.html asian association of utah
 
-
] [http://s1.shard.jp/galeach/new4.html cerasia] [http://s1.shard.jp/bireba/symantec-antivirus.html norton antivirus 2004 crack serial
 
-
] [http://s1.shard.jp/olharder/autoroll-654.html links] [http://s1.shard.jp/bireba/anyware-antivirus.html vexira antivirus
 
-
] [http://s1.shard.jp/frhorton/1kjwm4ocq.html africa disease gabon in security
 
-
] [http://s1.shard.jp/galeach/new40.html gay asian models
 
-
] [http://s1.shard.jp/galeach/new186.html asian car models
 
-
] [http://s1.shard.jp/galeach/new161.html asian boy lady mal
 
-
] [http://s1.shard.jp/losaul/2006-australia.html australia enter this win
 
-
] [http://s1.shard.jp/bireba/avg-antivirus.html antivirus software for windows 2000
 
-
] [http://s1.shard.jp/losaul/liberal-party.html australia land tours
 
-
] [http://s1.shard.jp/bireba/mobile-antivirus.html panda antivirus program
 
-
] [http://s1.shard.jp/olharder/collective-unconscious.html lynnway auto
 
-
] [http://s1.shard.jp/frhorton/ds9o5dtz4.html umqombothi african beer] [http://s1.shard.jp/frhorton/4bgszojmg.html africa mnet south survivor
 
-
] [http://s1.shard.jp/galeach/new127.html asia ex japan] [http://s1.shard.jp/olharder/brandon-auto.html head automatica album track list
 
-
] [http://s1.shard.jp/losaul/simple-plan.html australia online car insurance quote
 
-
] [http://s1.shard.jp/frhorton/k7b9qt4bf.html african americans history facts
 
-
] [http://s1.shard.jp/galeach/new9.html asia minor ionia
 
-
] [http://s1.shard.jp/losaul/australia-posters.html team dream australia
 
-
] [http://s1.shard.jp/bireba/symantec-antivirus.html how to remove symantec antivirus
 
-
] [http://s1.shard.jp/losaul/australia-food-product.html australia food product] [http://s1.shard.jp/bireba/panda-titanium.html pcclin antivirus
 
-
] [http://s1.shard.jp/olharder/autoroll-654.html top] [http://s1.shard.jp/losaul/the-barrier-reef.html kimberley clarke australia
 
-
] [http://s1.shard.jp/galeach/new50.html asian studies
 
-
] [http://s1.shard.jp/galeach/new176.html cai asia
 
-
] [http://s1.shard.jp/bireba/shield-2005-pro.html simworks antivirus s60
 
-
] [http://s1.shard.jp/frhorton/p7w3g6anv.html bbc africa
 
-
] [http://s1.shard.jp/bireba/extendia-antivirus.html mcaffee antivirus updates
 
-
] [http://s1.shard.jp/frhorton/jp87fttqi.html african american first names
 
-
] [http://s1.shard.jp/frhorton/lr43ii5kv.html african braid photo
 
-
] [http://s1.shard.jp/bireba/etrust-ez-antivirus.html antivirus cleanup
 
-
] [http://s1.shard.jp/frhorton/qtlusvqfk.html west african college of surgeons
 
-
] [http://s1.shard.jp/galeach/new11.html asian birthday invitation
 
-
] [http://s1.shard.jp/olharder/lisa-lopez-autopsy.html automobile dealer association
 
-
] [http://s1.shard.jp/bireba/panda-antivirus.html panda antivirus platinum 7.04] [http://s1.shard.jp/olharder/what-is-autonomously.html auto racing careers
 
-
] [http://s1.shard.jp/galeach/new19.html australasian institute of
 
-
] [http://s1.shard.jp/olharder/antique-autos-for.html atlanta attorney auto injury
 
-
] [http://s1.shard.jp/bireba/avg-antivirus-software.html 2005 norton antivirus download
 
-
 
-
http://www.textbasletoortr.com
 
=== VB Code ===
=== VB Code ===
-
以下程式來自於[http://home.pacbell.net/cetta/VB-Firebird-SAP.html VB Programming with Firebird].
+
以下程式來自於[http://home.pacbell.net/cetta/VB-Firebird-SAP.html VB Programming with Firebird]
-
*取得所有資料
+
*取得所有資料
<pre>
<pre>
FB-Connecting.vbp
FB-Connecting.vbp
第152行: 第26行:
End Sub  
End Sub  
</pre>
</pre>
-
*更新單筆資料
+
*更新單筆資料
<pre>
<pre>
Text1 = txtEStateCode
Text1 = txtEStateCode
第182行: 第56行:
End Sub
End Sub
</code>
</code>
-
*新增單筆記錄
+
*新增單筆記錄
<code>
<code>
Private Sub cmdAdd_Click()
Private Sub cmdAdd_Click()
第205行: 第79行:
End Sub
End Sub
</pre>
</pre>
-
*新增多筆記錄
+
*新增多筆記錄
<pre>
<pre>
Private Sub cmdAdd_Click()
Private Sub cmdAdd_Click()
第245行: 第119行:
End Sub
End Sub
</pre>
</pre>
-
*使用Stored Procedure
+
*使用Stored Procedure
<pre>
<pre>
-
/*以下為FirebirdSQL 的Creating a Stored Procedure*/
+
/*以下為FirebirdSQL 的Creating a Stored Procedure*/
Create Procedure SP_GETLIST
Create Procedure SP_GETLIST
第263行: 第137行:
END
END
-
'以下為VB Code
+
'以下為VB Code
Private Sub Command1_Click()
Private Sub Command1_Click()
第287行: 第161行:
</pre>
</pre>
-
=== VB&Firebird文章 ===
+
=== VB&Firebird文章 ===
*[http://home.pacbell.net/cetta/VB-Firebird-SAP.html VB Programming with Firebird]
*[http://home.pacbell.net/cetta/VB-Firebird-SAP.html VB Programming with Firebird]
*[http://www.ibphoenix.com/downloads/OdbcJdbc_ExamplesAdo.zip Examples Using ADO (VB)]
*[http://www.ibphoenix.com/downloads/OdbcJdbc_ExamplesAdo.zip Examples Using ADO (VB)]
-
=== VB參考網站 ===
+
=== VB參考網站 ===
-
[http://www.hosp.ncku.edu.tw/~cww/oldguy/oldguy.htm 老怪之VB初級生]
+
[http://www.hosp.ncku.edu.tw/~cww/oldguy/oldguy.htm 老怪之VB初級生]

在2009年6月4日 (四) 04:50所做的修訂版本

VB Code

以下程式來自於VB Programming with Firebird

  • 取得所有資料
FB-Connecting.vbp

Private sub Command1_Click()
Dim cn As New ADODB.Connection
Dim rs As New Recordset
Dim sql As String

cn.ConnectionString = "Provider=ZStyle IBOLE Provider; Data Source =    
 "_&"c:\ProgramFiles\Firebird\Firebird_1_5\Samples\Httplogs.gdb;UID=sysdba;password= pwd"
       
cn.Open sql= "Select* From   States" 

Set rs =   cn.Execute(sql) 

DoWhile Not rs.EOF
	 List1.AddItemrs(0) &  vbTab & rs(1) 
	rs.MoveNext 
Loop

rs.Close 
cn.Close 
End Sub 
  • 更新單筆資料
Text1 = txtEStateCode
Text2 = txtEStateName
Command1 = cmdEdit
Command2 = cmdAdd 

Private Sub cmdEdit_Click()
Dim cn1 As New ADODB.Connection
Dim sql As String

If txtEStateCode = "" Then MsgBox "Please enter a State Code!": _
txtEStateCode.SetFocus: Exit Sub

cn1.ConnectionString = "Provider=ZStyle IBOLE Provider; Data Source=" _
& "c:\Program Files\Firebird\Firebird_1_5\Samples\Httplogs.gdb; UID=sysdba; password=pwd"
cn1.Open

sql = "Update States Set State_Name='" & txtEStateName & "'" & _
 & " Where State_Code='" & UCase(txtEStateCode) & "'"

cn1.Execute sql

cn1.Close

txtEStateCode = ""
txtEStateName = ""

End Sub
</code>
*新增單筆記錄
<code>
Private Sub cmdAdd_Click()
Dim cn As New ADODB.Connection
Dim sql As String

If txtEStateCode = "" Then MsgBox "Please enter a State Code!": _
txtEStateCode.SetFocus: Exit Sub

cn.ConnectionString = "Provider=ZStyle IBOLE Provider; Data Source=" _
& "c:\Program Files\Firebird\Firebird_1_5\Samples\Httplogs.gdb; UID=sysdba; password=pwd"
cn.Open

sql = "Insert Into States (State_Code, State_Name) Values" _
        & "('" & UCase(txtEStateCode) & "','" & txtEStateName & "')"
cn.Execute sql

cn.Close

txtEStateCode = ""
txtEStateName = ""
End Sub
  • 新增多筆記錄
Private Sub cmdAdd_Click()
Dim cn As New ADODB.Connection
Dim sql As String
Dim i, rowCount As Integer
Dim lineItem As String
Dim itemArray

cn.ConnectionString = "Provider=ZStyle IBOLE Provider; Data Source=" _
& "c:\Program Files\Firebird\Firebird_1_5\Samples\Httplogs.gdb; UID=sysdba; password=pwd"  

cn.Open

'Add items to database 
rowCount= List1.ListCount 'getthe number of rows in the list  box

Do Until i = rowCount
lineItem = List1.List(i)
itemArray = Split(lineItem, vbTab)
            
sql = "Insert Into States (State_Code, State_Name) Values" _
        & "('" & UCase(itemArray(0)) & "','" & itemArray(1) & "')"

i =  i + 1 
cn.Execute sql
Loop

cn.Close
List1.Clear 
End Sub

Sub Private Sub Form_Load()
List1.AddItem "CO" & vbTab & "Colorado"
List1.AddItem "CT" & vbTab & "Connecticut"
List1.AddItem "MN" & vbTab & "New Mexico"
List1.AddItem "WY" & vbTab & "Wyoming"

End Sub
  • 使用Stored Procedure
/*以下為FirebirdSQL 的Creating a Stored Procedure*/
Create Procedure SP_GETLIST

BEGIN
 SELECT State_Code, State_Name

 FROM States

 Where State_Code = 'VA'
 INTO :State_Code, :State_Name;


 SUSPEND;

END

'以下為VB Code

Private Sub Command1_Click()
Dim cn As New ADODB.Connection
Dim cmd As ADODB.Command

cn.ConnectionString = "Provider=ZStyle IBOLE Provider; Data Source=" _
& "c:\Program Files\Firebird\Firebird_1_5\Samples\Httplogs.gdb; UID=sysdba; password=pwd"
cn.Open

Set cmd = New ADODB.Command
cmd.ActiveConnection = cn
cmd.CommandText = "SP_GETLIST"
cmd.CommandType = adCmdStoredProc

cmd.Execute

Text1 = cmd.Parameters(0).Value
Text2 = cmd.Parameters(1).Value

cn.Close
End Sub

VB&Firebird文章

VB參考網站

老怪之VB初級生