- ¥»¸ê®Æ®w½d¨Ò¥u¾A¥Î Dao ª«¥ó¡A³æ¤@¨Ï¥ÎªÌªº¾Þ§@¡A¦h¨Ï¥ÎªÌ¤Îºô¸ô¤Wªº¨Ï¥Î¡A¦]¦³§ó¦hªº¨î¡A¥»½d¨Ò¥¼¥²¯à¥¿½T°õ¦æ¡C¥»½d¨ÒÅwªï«DÀç§Q©ÊÓ¤H¤Î²Õ´Âà¸ü¨Ï¥Î¡AÀç§Q¤§§Q¥Î½Ð¥ý¼x±o¥»¤H¤§¦P·N¡A¨Ó«Hµù©ú¨Ï¥Î¤è¦¡¤Î¦^ÂЦa§}¡C
- DBGrid¡BDBCombo ÁöÄÝ VB ¥~«Ø±±¨î¶µ¡A¦ý¦]»P
Dao ¸ê®Æ®w®§®§¬ÛÃö¡A©Ò¥H¤]©ñ¥»½g°Q½×¡A¦Ó¤£¥¦ÂkÃþ¦b
ActiveX ¶µ¡C
- ¥»½d¨Ò©Ò¦³ªºµ{¦¡½X½d¨Ò¡A¬ÒÄݤQ¤À°ò¥»ªº
VB »yªk¡A¦pªG±z¬OÓ VB User ¡AÅwªïª½±µ¤Þ¥Î©Î§ï¼g¨Ï¥Î¦b§Aªºµ{¦¡¤¤
¡A¥»¤H¤£¥D±iµÛ§@Åv¡A¦]¬°¡A¨S¿ìªk¬d¹À¡C
- ¦pªG§A¬OÓ VB ªì¾ÇªÌ¡A¤S¦³ÂI½a½a(©M¦Ñ©Ç¤@¼Ë)¡A»°§Ö§â¥»¶¥t¦s·sÀɨì§A¦Û¤vªººÏºÐ¡AÂ÷½u«áºCºC¬Ý¡A¤]¥i¥H
Copy µ¹ªB¤Í³á(¤£¥i¥H¦¬¿ú)¡C
- ¥»½d¨Ò³£¬O¦Ñ©Ç´XÓ¤ë¨Ó¦b tw.bbs.comp.language
°Q½×¸s²Õ¤¤¦^µªª©¤Í°ÝÃDªº¦X¿è¡A¦]¬°¬O°w¹ï°ÝÃD¸Ñ¨M¡A©Ò¦³¨Ã¨S¦³¥þ±Æ[©Àªº¸Ñ»¡¡A¤£¾A¦X§@¬°¤Jªù¤å³¹¡A¦ý¦pªG§AŪ¤F¤Jªù®Ñ¡A©Î¬O¤W¤F¦Ñ®vªº½Ò¡A¤ß¤¤¤´¤£¬Æ©ú¥Õªº¸Ü¡A´N¥i¥H¨Ó³o§ä§ä¦³¨S¦³§Anªºµª®×¡A¦]¬°³o³£¬O§O¤H°Ý¹Lªº°ÝÃD¡C
ºÆ¨g²Ô¥K ¼¶¼g©ó¤å³¹
¸ê®Æ¶Ç¦^¦Ü DBgrid ®É,¦p¦ó©T©w¨C¤@ÓÄæ¦ìªº¼e«×©O?¥H§KUserÁÙn¦Û¦æ½Õ¾ãÄæ¼eªº§xÂZ!
¦Ñ©Çµª¡G
Option Explicit
'°õ¦æ¥»µ{¦¡¡A¦b Column »P Column
¶¡«ö¨â¤U§Y¥i½Õ¾ã
'Column ¼e«×,´N¦p¦P Access ©M Excel ¾Þ§@¤è¦¡¤@¼Ë
Dim IsResize As Boolean
Dim ColNo As Integer
'³]©w DBGrid.Columns ¼e«×ªº¦Ûq¨ç¼Æ
Private Sub SetGridWidth(ByVal DG As DBGrid, ByVal ColNum As
Integer)
Dim MeFont As StdFont
Dim I As Integer
Dim ColWidth As Single
Dim TempWidth As Single
'Àx¦s Me.Form ªºì¦r«¬³]©w
Set MeFont = Me.Font
'§â Me ©M DBGrid
¦r§Î³]¬°¤@¼Ë¥H§Qpºâ¼e«×
Set Me.Font = DG.Font
'¥ýºâÄæ¦ì¼ÐÃD¼e«×
ColWidth = Me.TextWidth(DG.Columns(ColNum).Caption)
'DBGrid.VisibleRows ªí¥Ü DBGrid
Á`¦C¼Æ
For I = 0 To DG.VisibleRows - 1
'¥Î Me.TextWidth
ºâ¸ê®Æ¦r¦ê¼e«×
'§Q¥Î CellText
¤Î RowBookMark ¨â¤èªkªº°t¦X¡A¥i¥H¤£¥Î
'²¾°Ê Cell
«ü¼Ð¦Ó¨ú±o¯S©w Cell ¦r¦ê¡A¸Ô±¡°Ñ¾\ VB Help
TempWidth =
Me.TextWidth(DG.Columns(ColNum).CellText(DG.RowBookmark(I)))
'¦pªG¦r¦ê¸û¼e«h¼e«×¤¬´«
If TempWidth >
ColWidth Then
ColWidth = TempWidth
End If
Next
'¦]¬°¦Ò¼{Ãä½u¤Î¶¡¶Z¡A¥[ÂI¼e«×¤~¯à§¹¥þ®e¤U
DG.Columns(ColNum).Width = ColWidth +
ScaleX(90, vbTwips, Me.ScaleMode)
Set Me.Font = MeFont
End Sub
Private Sub DBGrid1_ColResize(ByVal ColIndex As Integer,
Cancel As Integer)
'³]©w½Õ¾ã¼e«×«ü¼Ð¬°¯u
IsResize = True
'°O¤U¨ºÓ Column ³Q½Õ¾ã
ColNo = ColIndex
End Sub
Private Sub DBGrid1_DblClick()
'¥u¦³·í IsResize ¬°¯u¤~½Õ¾ã¼e«×
If IsResize Then
'°õ¦æ
SetGridWidth ¦Ûq¨ç¼Æ
'ColNo
¬°Âù¦V½bÀY«eªº Column ½s¸¹
SetGridWidth
DBGrid1, ColNo
End If
End Sub
Private Sub DBGrid1_MouseDown(Button As Integer, Shift As
Integer, X As
Single, Y As Single)
'ÁÙì¼e«×«ü¼Ð¬°¥¼½Õ¾ã
IsResize = False
End Sub
¹L¤F¼öÅʪº©u¸`... ¼¶¼g©ó¤å³¹
½Ð°Ývb¦p¦ó±Naccess¤¤ªº¬d¸ß§R°£....¤p§Ì¥ÎCreateQueryDef¦baccess¤¤«Ø¥ß¤F¤@Ó¬d¸ßStuQry2
DB.CreateQueryDef("StuQry2", QSQL)
½Ð°Ýn¤U¦p¦ó«ü¥O¤~¯à±N³oÓview§R°£¡H
¦Ñ©Çµª¡G
DB.QueryDefs.Delete "StuQry2"
¦^¯Á¤Þ
¹L¤F¼öÅʪº©u¸`... ¼¶¼g©ó¤å³¹
¦U¦ì°ª¤â.¤p§Ì¥ÎVB·Q±NACCESS¤¤ªº¾Ç¥Í¸ê®Æ®wªº¦~¯Å©¹¤W¥[¤@¦~.½Ð°Ý§Úªº¼gªkþ¸Ì¿ù¤F.ÁÂÁ¡G
SQL="UPDATE STUM1
SET YEAR=CASE WHEN YEAR='°ê¤@'THEN'°ê¤G'"
SQL=SQL & "WHEN
YEAR'°ê¤G'THEN'°ê¤T'"
SQL=SQL&"END"
¦Ñ©Çµª¡G
- ¦b SQL ¤¤¤£¯à¨Ï¥Î IF,Case
µ¥¦h¦æ¬yµ{±±¨î±Ôz¡A¦pªG§Aªº¸ê®Æ®w¬O
MDB¡A«h¥i¥Î IIF() ¨ç¼Æ´À¥N¡C
SQL="UPDATE Stum1 SET Stum1.Year = "
SQL=SQL & "IIf([stum1]![Year]='°ê¤@','°ê¤G','°ê¤T')
"
SQL=SQL & "WHERE ((([Stum1]![Year])<>'°ê¤T'));"
- IIf() ¨ç¼Æ¦b Jet SQL ÁöµM¤ä´©¡A¦ý ANSI SQL
«h¥¼¥²¤ä´©¡A©Ò¥H§AÁÙ¬O¤À¨âÓSQL °õ¦æ¸û¦n¡G
- ¥ý°õ¦æ
SQL="UPDATE Stum1 SET Stum1.Year ='°ê¤G'
"
SQL=SQL & "WHERE ((([Stum1]![Year])='°ê¤@'));"
- ¦A°õ¦æ
SQL="UPDATE Stum1 SET Stum1.Year ='°ê¤T'
"
SQL=SQL & "WHERE ((([Stum1]![Year])='°ê¤G'));"
¦^¯Á¤Þ
µL¤ß ¼¶¼g©ó¤å³¹
¤@ÓAccessÀÉ®× , ¦p¦ó³Q¨âÓAP¶}±Ò,§Ú¥ý¥ÎAccess¶}±Ò, µM«á¶]VBµ{¦¡¶}±Ò³£·|³y¦¨¿ù»~¡H
¦Ñ©Çµª¡G
¸Õ¸Õ¬Ý¤U±ªº¤è¦¡¦æ¤£¦æ
Option Explicit
Dim Db As Database
Dim Rs As Recordset
Private Sub Form_Load()
Set Db = OpenDatabase("YourDataName")
Set Rs = Db.OpenRecordset("YourTableName",
dbOpenDynaset, dbSeeChanges,
dbPessimistic)
Set Data1.Recordset = Rs
End Sub
Private Sub Form_Unload(Cancel As Integer)
Rs.Close
Db.Close
End Sub
¦b¸ê®Æ®w¦h¨Ï¥ÎªÌÀô¹Ò¤U¡AOpenRecordset ¤èªkªº
type, options, lockedits °Ñ¼Æ¦p¦ó¤U¡A·|Åܪº«Ü½ÆÂø¡A½Ð¦Û¦æ°Ñ¦Ò
Dao Help ¡AOpenDatabase and OpenRecordset¡C
¦^¯Á¤Þ
«Ê¾÷Åo ¼¶¼g©ó¤å³¹ ...
½Ð°Ývbµ{¦¡°õ¦æ®É¥L»¡°Ñ¼Æ¤£¨¬,¹w´Á¬Oc..¬O¨º¸Ì¥X¤F°ÝÃD,µ{¦¡¦p¤U¡G
Private Sub CmdFind_Click()
Dim cinput As String
Dim QDpic As Database
Dim QDpicer As Recordset
cinput = InputBox("½Ð¿é¤J±ý¬d¸ß¤§¸ê®Æ",
"¸ê®Æ®w¬d¸ß")
Set QDpic = OpenDatabase("c:\vb4\1\class.mdb")
Set QDpicer = QDpic.OpenRecordset("select * from class
where [©m¦W]=NameText")
¦Ñ©Çµª¡G
Set QDpicer = QDpic.OpenRecordset("select * from
class where [©m¦W]= '" & cinput & "'")
¦^¯Á¤Þ
±H¥óªÌ: f9853315
¤p§Ì¥Ø«e©Ò¼g¤§µ{¦¡¤D¬O¥H¤@textbox§@¬°ÃöÁä¦r¤§¿é¤J,±µµÛ¥Hsql»yªk¤¤select
where»yªk¶i¦æ¸ê®Æ®w¬d¸ß,¥Ø«e¶È¯à¦btextbox¤¤¿é¤J³æ¤@¦r¦ê¨Ó¬d¸ß.¦]¦¹²{¦bªº§xÂZ¬O¦p¦ó¯à¦btextbox¤¤¿é¤J¦hÓ¦r¦ê,µM«á¥H¥¬ªL¹Bºâ¦¡(and,or....)¨Ó¬d¸ß,sql»yªkn«ç»ò¼g?
¦Ñ©Çµª¡G
- ¦r¦êµLªk°µ And & Or ¹Bºâ¡C
- §A¥i¥H§ï¥Î Like °t¦X¸U¥Î¦r¤¸¡A½d¨Ò¦p¤U¡C
Text1.Text="VB"
Text2.Text="¦Ñ©Ç"
Text3.Text="¨Ò"
SELECT * FROM YourTable WHERE SomeField LIKE
"*" & Text1.Text & "*" &
Text2.Text & "*" & Text3.Text &
"*"
dreamlim ºô¤Í¨Ó¨ç«ü¥¿¡G
§A¦b "¥H Like ¤Î ¸U¥Î¦r¤¸ªº¬d¸ß"¤å³¹¤¤©Ò¨Ï¥ÎªºSQL
¸U¥Î¦r¤¸¬° "*",¦ý³o¬OVB Jet Engine
¨Ï¥Îªºªº¦r¤¸,¦b¼Ð·ÇªºSQL ©w¸q¤¤,¨ÃµL *
ªº©w¸q,À³§ï¬°¡G
JET SQL |
Standard
SQL |
Note |
* |
% |
¡@ |
# |
_ |
¬°under line |
¦Ñ©Çµª¡G
·PÁ dreamlim ¨Ó¨ç«ü¥¿¡AJet SQL ©M Standard SQL
Áö¤j¦P¦Ó¤p²§¡A¦ý¨s³ºÁÙ¬O¦³©Ò®t²§ªº¡A¦b¦¹¦A¦¸´£¿ô¤j®a¡A¥»½g©Ò¦³½d¨Ò¡A³£¬O³æ¾÷
MDB ¸ê®Æ®wªº¾Þ§@½d¨Ò¡A¦pªG§AÂà¥Î¨ì§Oªº¸ê®Æ®w¡A¹ï©ó
SQL ªº¨Ï¥Î®t²§¡A¤@©wn¯S§Oª`·N¡C
¦^¯Á¤Þ
¨«¹L¥|¤è¦^¨ììÂI ¼¶¼g©ó¤å³¹
§Ú»Ýn±N¤@¨Ç¤å¦rÀÉ¡]*.txt¡^¦bµ{¦¡°õ¦æ®É¤~Âà´«¦¨mdb¸ê®Æ®wÀɤ¤ªº´X±i¸ê®Æªí³æ¡A§Ú·|¦bµ{¦¡¤¤
¹ï¨äקï¡A¥B§Æ±æק粒«á¤£¥u¯à¦^¦s¦Ü¸ê®Æªí³æ¤¤¡AÁ٧Ʊæ¯à¦s¦¨û¨Óªº¤å¦rÀɧΦ¡¡A¤£ª¾¹D³on«ç»ò°µ°Ú¡H¡H
¦Ñ©Çµª¡G
À³¾Þ§@ VB ªº Dao ª«¥ó°µ¥H¤U°Ê§@¡G
- ²£¥Í MDB ÀɮסA¦p¡G
Set Ws = DBEngine.Workspaces(0)
Set DB = Ws.CreateDatabase(App.Path & "\textlink.mdb",
dbLangGeneral)
- ²£¥Í¤å¦rÀɳsµ²ªí
Set Td = DB.CreateTableDef("DataLink")
Td.Connect = "TEXT;DATABASE=" & App.Path
Td.SourceTableName = "datatest.txt"
DB.TableDefs.Append Td
- ²£¥Í[¸ê®Æªí²£¥Í¬d¸ß]
Set Qd = DB.CreateQueryDef("CreatQry")
Qd.SQL = "SELECT * INTO DataEdit FROM DataLink;"
Qd.Execute
- ¥Î²£¥Í¸ê®Æªí¬d¸ß²£¥Í¥i¨Ñ½s¿èק諸 Table
Set DB = OpenDatabase(App.Path & "\textlink.mdb")
'§R°£Âªº½s¿èªí DataEdit
DB.TableDefs.Delete "DataEdit"
'CreatQry
¬O¨Ì¤å¦rÀɤº®e²£¥Í¸ê®Æªí¤§«Ø¥ß¬d¸ß
Set Qd = DB.QueryDefs!CreatQry
'°õ¦æ««Ø DataEdit Table ¤§¥\¯à
Qd.Execute
Qd.Close
- ¶}±Ò Table ½s¿èקï
Set Rs = DB.OpenRecordset("DataEdit",
dbOpenDynaset)
- ±N½s¿è¹L«áªº Table ¡A¥Î VB File I/O
ªº³¯z¡A¨Ì®æ¦¡¤@µ§¤@µ§«·s¦^¼gì¤å¦rÀÉ¡C
»Ý¥Îµ{¦¡±Ôz»á¦h¡A½Ð°Ñ¦Ò¤U±ªº§¹¾ã½d¨Ò¤¤ªº
btnUpdate_Click() µ{§Ç¡C
- ¥H¤U¬O¦U¨BÆJ°õ¦æ¤èªk¤§§¹¾ã½d¨Ò¡G
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0";
"DBGRID32.OCX"
Begin VB.Form frmTextLink
Caption = "²©ö¤å¦rÀɸê®Æ®w½s¿è¾¹"
ClientHeight = 4200
ClientLeft = 60
ClientTop = 345
ClientWidth = 6120
LinkTopic = "Form1"
ScaleHeight = 4200
ScaleWidth = 6120
StartUpPosition = 3 '¨t²Î¹w³]È
Begin VB.CommandButton btnUpdate
Caption = "§ó·s¤å¦rÀÉ"
BeginProperty Font
Name = "·s²Ó©úÅé"
Size = 9
Charset = 136
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4800
TabIndex = 2
Top = 3480
Width = 1215
End
Begin VB.CommandButton btnQuit
Caption = "µ²§ô"
BeginProperty Font
Name = "·s²Ó©úÅé"
Size = 9.75
Charset = 136
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4800
TabIndex = 1
Top = 240
Width = 1215
End
Begin MSDBGrid.DBGrid DBGrid1
Bindings = "textlink.frx":0000
Height = 3375
Left = 240
OleObjectBlob = "textlink.frx":0010
TabIndex = 0
Top = 120
Width = 4335
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '¹w³]ªº¸ê®Æ«ü¼Ð
DefaultType = 2 '¨Ï¥Î ODBCDirect
Exclusive = 0 'False
Height = 405
Left = 240
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 '°ÊºA¶°(Dynaset)
RecordSource = ""
Top = 3600
Width = 4380
End
End
Attribute VB_Name = "frmTextLink"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'¥»µ{¦¡¥²³Æ¤§°t¦XÀÉ®× DataTest.txt
Dim Ws As Workspace
Dim DB As Database
Dim Td As TableDef
Dim Qd As QueryDef
Dim Rs As Recordset
'¸ê®ÆÀɬO§_³Q§ó§ï¤§µù¼Ð
Dim DataIsChange As Boolean
Private Sub btnQuit_Click()
Unload Me
End Sub
Private Sub btnUpdate_Click()
Dim FileHandle As Integer
Dim I As Long, J As Long
Dim OutString As String
Me.MousePointer = 11
FileHandle = FreeFile
Open App.Path & "\datatest.txt" For Output
As #FileHandle
'¿é¥X¤å¦rÀɪºÄæ¦ì¦WºÙ
OutString = Chr(34)
'Chr(34)=["]
For I = 0 To Rs.Fields.Count - 1
OutString = OutString & Rs.Fields(I).Name & Chr(34)
& "," & Chr(34)
Next
'¥h±¼¦r§À³Ì«á¤@Ó³r¸¹ "," ¤Î Chr(34)
OutString = Mid(OutString, 1, Len(OutString) - 2)
Print #FileHandle, OutString
'¿é¥X¤å¦rÀɪºÄæ¦ì¤º®e
Rs.MoveFirst
Do While Not Rs.EOF
OutString = Chr(34)
For I = 0 To Rs.Fields.Count - 1
OutString = OutString & Rs.Fields(I).Value & Chr(34)
& "," & Chr(34)
Next
OutString = Mid(OutString, 1, Len(OutString) - 2)
Print #FileHandle, OutString
Rs.MoveNext
Loop
'Ãö³¬¤å¦rÀÉ
Close #FileHandle
'¦]¬°¸ê®Æ¤w¦^¦s¤å¦rÀÉ¡A©Ò¥H DataIsChange=False
DataIsChange = False
Me.MousePointer = 0
End Sub
Private Sub DBGrid1_AfterUpdate()
'¸ê®Æªí¦³§ó°Ê«h±N§ó°Êµù¼Ð³]¬° True
DataIsChange = True
End Sub
Private Sub Form_Load()
Dim DbOpen As Boolean
'¦pªG¸ê®Æ®w¥¼²£¥Í«h²£¥Í¸ê®Æ®w
If Dir(App.Path & "\textlink.mdb") =
"" Then
CreatMdbFile
DbOpen = True
End If
'¤w¦³¸ê®Æ®w«h°õ¦æ¸ê®Æªí««Ø
If Not DbOpen Then
ReBuildTable
End If
'¶}±Ò¸ê®Æ¿ý
Set Rs = DB.OpenRecordset("DataEdit",
dbOpenDynaset)
'DataControl ¨ì³Ì«á¤@µ§ªí·s¼W¸ê®Æ
Data1.EOFAction = 2
'DBGrid ¤¹³\·s¼W¡B§R°£¸ê®Æ
DBGrid1.AllowAddNew = True
DBGrid1.AllowDelete = True
Set Data1.Recordset = Rs
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim Answer
'¦pªG¸ê®Æ¦³§ó°Ê¦Ó©|¥¼¦^¦s
If DataIsChange Then
'°õ¦æ²×¤î½T»{
Answer = MsgBox("§A¸ê®Æ¥¼¦sÀÉ¡A½T©wnÂ÷¶}¶Ü¡H",
vbYesNo, _
"²×¤î½T»{")
'µª§_«h¤£²æÂ÷
If Answer = vbNo Then
Cancel = True
Exit Sub
End If
End If
On Error Resume Next
Rs.Close
DB.Close
Ws.Close
End Sub
'²£¥Í textlink.mdb ¸ê®Æ®w¤§°Æµ{§Ç
Private Sub CreatMdbFile()
'²£¥Í¸ê®Æ®w
Set Ws = DBEngine.Workspaces(0)
Set DB = Ws.CreateDatabase(App.Path & "\textlink.mdb",
dbLangGeneral)
'²£¥Í¤å¦rÀɳsµ²ªí
Set Td = DB.CreateTableDef("DataLink")
Td.Connect = "TEXT;DATABASE=" & App.Path
Td.SourceTableName = "datatest.txt"
DB.TableDefs.Append Td
'²£¥Í¥i¨Ñ½s¿è¤§ DataEdit Table
Set Qd = DB.CreateQueryDef("CreatQry")
Qd.SQL = "SELECT * INTO DataEdit FROM DataLink;"
Qd.Execute
Qd.Close
End Sub
'«¸m¥i½s¿è¸ê®Æªí¤§°Æµ{§Ç
Private Sub ReBuildTable()
Set DB = OpenDatabase(App.Path & "\textlink.mdb")
'§R°£Âªº½s¿èªí DataEdit
DB.TableDefs.Delete "DataEdit"
'CreatQry
¬O¨Ì¤å¦rÀɤº®e²£¥Í¸ê®Æªí¤§«Ø¥ß¬d¸ß
Set Qd = DB.QueryDefs!CreatQry
'°õ¦æ««Ø DataEdit Table ¤§¥\¯à
Qd.Execute
Qd.Close
End Sub
- ¨Ï¥Î¤å¦rÀɤ§®æ¦¡¡G
"No","Name","Level","Class"
"0001","¾G¹Å¹Å","1","¥Ò"
"0002","¿à¬K·½","2","¤þ"
"0003","³¢¬K¾ð","2","¥Ò"
"0004","ªL¦w}","2","¥Ò"
"0005","³¯«iªQ","2","¤A"
"0006","¦óªá»","1","¤A"
"0007","»¯¦¨¥\","3","¤þ"
"0008","¼B¨q¬ü","2","¥Ò"
"0009","¼B®Ûªá","3","¤A"
¦^¯Á¤Þ
®öº©»P·Å¬Xªº¤½ÃÉ ¼¶¼g©ó¤å³¹
¬°¤FÀ£ÁY MDB
¸ê®Æ®w¡A¥²¶·¥ý§â³QÀ£ÁYªº¸ê®Æ®wÃö³¬¡A¦ý¦p
DBgrid ©M DataControl
¤´©M¸ê®Æ®wÁpµ²¡A¨ºn¦p¦ó¥ýÃö±¼¸ê®Æ®w¡AÀ£ÁY§¹¦A³sµ²¤W©O¡H
¦Ñ©Çµª¡G
- ¥Îª«¥óÅܼƶ}±Ò¸ê®Æ®w
- Dim Db As Database
- Dim Rs As Recordset
- Private Sub LoadData()
Set Db = OpenDatabase("Path&DatabaseName")
Set Rs =Db.OpenRecordset("Table or Querydef
Name")
Set Data.Recordset= Rs
End Sub
- '¦bªí³æ±Ò©l LoadData
Private Sub Form_Load()
'°õ¦æ¸ü¤J¸ê®Æªí¦Ûq¨ç¼Æ
Call LoadData
End Sub
- Ãö³¬ DataControl ³sµ²¸ê®Æ®w
- Data1.Recordset.Close
- Data1.Database.Close
- DBEngine.CompactDatabase "SourceDatabase",
"TargetDatabase"
- DataControl «·s³sµ²¸ê®Æ®w
- '°õ¦æ¸ü¤J¸ê®Æªí¦Ûq¨ç¼Æ
Call LoadData
¦^¯Á¤Þ
º©«L~ ¼¶¼g©ó¤å³¹
½Ð°Ý~~Excel°µ¦¨ªºÀÉ®×~~¦p¦ó¥ÎvbÂন.txtÀÉ~~
¦Ñ©Çµª¡G
- °µªk¤£¥u¤@ºØ¡A¦ý¦Ò¼{¬Ù¨Æ¤Î¤£¶·¾a Excel
ª«¥ó¡A¥H±Ä¥Î Dao ¦ê±µ¤è¦¡³Ì¬°«K§Q¡C
- ¥Î MDB ¶} Excel ¡A¤èªk½Ð°Ñ¦Ò [Dao »P SQL
»yªk½d¨Ò(¤@)] ¤¤¦b Dao ¤¤¶}±Ò Excel Àɮתº½d¨Ò¡C
- ¦A±N table
¸ê®Æ¿é¥X¦¨¤å¦rÀÉ¡A¤èªk½Ð°Ñ¦Ò¥»½d¨Ò [¤å¦rÀɸê®Æ®wªº½s¿è¤Î¦^¦s]
¡C
¦^¯Á¤Þ
±H¥óªÌ: ¿c©ú¼w
- ¦b SQL
¸óªí¬d¸ß¤¤¡A¦p¦ó°µ¨ì¥D¯Á¤Þªíªº¦hÓÄæ¦ìÃöÁp¨ì³Q¯Á¤Þªíªº¦P¤@ÓÄæ¦ì¡H
- §Úªº¸ê®Æªíµ²ºc¦p¤U¡G
TableA |
A_ID |
A1 |
1 |
ABC |
2 |
123 |
3 |
DTW |
4 |
456 |
5 |
AAA |
- ¡@
TableB |
B_ID |
B1 |
B2 |
1 |
1 |
1 |
2 |
1 |
2 |
3 |
5 |
2 |
4 |
3 |
4 |
- TableB ªº B1 ©M B2 ¹ï¬M¨ì TabelA.A_ID ªº
¡A§Ú§Æ±æ TabelB ¨Ì¨ä B1¡AB2 Ä檺¤º®e¦ÓÅã¥Ü¬Û¹ï¬Mªº
A1 Äæ¦ìÈ¡Aµ²ªG§Æ±æ¹³¤U¦C¤@¼Ë¡G
- ¡@
QueryResult |
B_ID |
Q1 |
Q2 |
1 |
ABC |
ABC |
2 |
ABC |
123 |
3 |
AAA |
123 |
4 |
DTW |
456 |
- §Ú¥Î SQL JOIN ±Ôz¡A¥u¯à¦b Q1 ©Î Q2
¤¤¿ï¾Ü¨ä¤@¡A¥i§_¨â¼Ë³£¯àÅã¥Ü¬Û¹ï¬M
TabelA.A1 È©O¡H
¦Ñ©Çµª¡G
- ³oµLªk¥Î³æ¤@ªº SQL ¬d¸ßµª¦¨¡A¦Ó¬O¥Î
QueryDef ¬° TableA °µ¥X¤@Ó¤À¨¡A³s¦P TableA
³oÓ¥»´L¡A´N¦³¬Û¦P°O¿ýªº¨âÓ¸ê®Æªí¨Ó©M
TableB Ápµ²¹ï¬M¡C
- ¥H¤U¬°»¡©ú¤°»ò¬O Table ¥»´L¡H¤°»ò¬O
QueryDef ¤À¨¡H§ÚÌ°®¯Ü¥Î¨âÓ TableA ªº
QueryDef ¤À¨¨Ó¸ò TabelB ÃöÁp¡C
- »s§@ Table ¤À¨ A_Join_B1 ¤Î A_Join_B2¡G
- Dim Db As Database
Dim Rs As Recordset
Dim Qd As QueryDef
Set Db = OpenDatabase("DataPath & Name")
- Set Qd = Db.CreateQueryDef()
Qd.Name = "A_Join_B1"
Qd.SQL = "SELECT * FROM TableA;"
Db.QueryDefs.Append Qd
- Set Qd = Db.CreateQueryDef()
Qd.Name = "A_Join_B2"
Qd.SQL = "SELECT * FROM TableA;"
Db.QueryDefs.Append Qd
- ¥Î¸óªí¬d¸ß¬° B1 ©M B2 ¤À§OÁp¤W TabelA¡G
- SqlString = "SELECT TableB.B_ID, A_Join_B1.A1,
A_Join_B2.A1 " & _
"FROM (TableB INNER JOIN A_Join_B1 ON TableB.B1
= A_Join_B1.A_ID) " & _
"INNER JOIN A_Join_B2 ON TableB.B2 = A_Join_B2.A_ID;"
Set Rs = Db.OpenRecordset(SqlString)
- ´N³o¼Ë¡A§Q¥Î QueryDef ¥i¥H¬° Tabel
©µ¦ù¥XµL¦hªº¤À¨¡A¤]´N¬O»¡¤@Ó¸ê®Æªí¥i¥H¦³³\¦hÓÄæ¦ìÃöÁp¤@ÓÄæ¡A¨Ã¥B©¼¦¹¥i¥H¦³¤£¦Pªº³]©wÈ¡C
¦^¯Á¤Þ
¯_¯_ ¼¶¼g©ó¤å³¹
§Ú̦³¤@ÓÃÄ«~ªºtable·íªì³]p½s¸¹ªº®ÉÔ¤w¸g¦b½s½X¤W³]p¦n¡A¨Ò¦p
010203¡G
- «e¨â½X...¥Nªí¤HÅé¨t²Î¤ÀÃþ
- ¤¤¶¡¨â½X ¥NªíÃĪ«ªº¤ÀÃþ
- «á¨â½X ¥Nªí¨CÓÃÄ«~ªº½s¸¹
²{¦b·Qn»s§@¤@±i³øªí¥²¶·n¤ÀÃþ¡ASQL¦³¿ìªkª½±µ§P§O§Úªº½s½X¶Ü?´N¬O¥i¥H§â010203³oÓÃÄ«~...ª½±µ¦w±Æ¨ì01³oÓ¨t²Î¤ÀÃþ¤Uªº02ªº³oÓÃÄ«~¤ÀÃþ¶Ü?ÁÙ¬O§Ú±o§â¤@ÓÄæ¦ì¤À¦¨¤TÓÅܦ¨
01 02 03 ©O?
¦Ñ©Çµª
¤£¶·n¤À¤TÓÄæ¦ì¡A¥i¥H¥Î Like
°t¦X¸U¥Î¦r¤¸°µ¡G
- SELECT * FROM YourTabelName WHERE FieldName LIKE
"01????"
- SELECT * FROM YourTabelName WHERE FieldName LIKE
"??02??"
- SELECT * FROM YourTabelName WHERE FieldName LIKE
"????03"
¦ý¦³¤@Ó«Ü«nªº¥ý¨M±ø¥ó¡A¨C¤@Ãþ¦û¥Îªº½X¼Æ»Ý©T©w¡A¤£¥i¦b¤£¦P°O¿ý¤¤¦³¤£¦Pªº±`µu¡C
¦^¯Á¤Þ
±H¥óªÌ: ¼B½å²» ¥D¦®: ¸ê®Æ®w¨D¨ä¥æ¶°
- ¦³¤@¸ê®Æ®w,¦pªG¥H²Å¦X"±ø¥ó¤@"ªº±ø¥ó¤U¥h·j´M,±o¨ìªº
µ²ªG¬°"¶°¦X¤@";
- ¥H²Å¦X"±ø¥ó¤G"ªº±ø¥ó¤U¥h·j´M,±o¨ìªºµ²ªG¬°"¶°¦X¤G";
- ¥H²Å¦X"±ø¥ó¤T"ªº±ø¥ó¤U¥h·j´M,±o¨ìªºµ²ªG¬°"¶°¦X¤T";
- ½Ð°Ý¦p¦ó¥Ñ"¶°¦X¤@"¡B"¶°¦X¤G"
¤Î"¶°¦X¤T"¨ú±o¨ä¥æ¶°,¥i§_¨Ï¥ÎSQL»y¨¥?
¦Ñ©Çµª¡G
SQLString="SELECT * FROM DataTable WHERE Field1=±ø¥ó¤@
AND Field2=±ø¥ó¤G AND Field3=±ø¥ó¤T;"
¦^¯Á¤Þ
°@¸Û¨Ñ¾i´I¶QÂùÁ{ ¼¶¼g©ó¤å³¹
¥Ñ©ó§Ú¦b¦C¦L³øªí¤¤»Ýn¸Ô²Óªº¦æ¼Æ¸ê®Æ¡A§_«h³]p¦nªº®æ¦¡´N·|¶Ã±¼¡A¦ý¬O§Ú¦bVB¤¤§ä¤£¨ìpºâ³ÆµùÄæ¦æ¼Æªº¤èªk¡A³oÂI¯uªº«Ü§xÂZ¡C
¦Ñ©Çµª¡G
- Dao
ª«¥ó¤¤¨ÃµL¤À¦æªºÄÝ©Ê©M¤èªk¥i¨Ñ¾Þ§@¡A§ÚÌ¥²¶·¥t¼gµ{¦¡¡C
- µ{¦¡ªº«ä¦Ò¤è¦V¬O§â Memo
¤º®e·í°µ¤@Óªø¦r¦ê¡A§Ú̥ΠField.GetChunck
¤èªk§â¥¦§ì¨ì¦r¦êÅܼƤ¤«á¡A´Nª½±µ¥Î VB
¦r¦ê³B²z¨ç¼Æ¨Ó§â¥¦¤Á¦¨¤@¤p¬q¤@¤p¬q©T©wªø«×ªº¦r¦ê¡C
- ½d¨Ò¦p¤U¡G
Option Explicit
'´ú¸Õ¥»µ{¦¡½Ð¦bªí³æ¤W©ñ Command1,List1
Dim Db As Database
Dim Rs As Recordset
'ArrayString() ¬O¤À¦C¦r¦ê
Dim ArrayString() As String
Private Sub Command1_Click()
'§ì Memo ¦r¦êÅܼÆ
Dim LongString As String
'§PÂ_¦r¦ê
Dim ShortWord As String * 1
'¤À¦C¦r¦ê
Dim LongWord As String
Dim I As Long, J As Integer, K As Byte
Rs.MoveFirst
'°²³]Äæ¦ì NOTE ¬O Memo Äæ¦ì
LongString = Rs!NOTE.GetChunk(0, Rs!NOTE.FieldSize)
For I = 1 To Len(LongString)
ShortWord =
Mid(LongString, I, 1)
Select Case
ShortWord
'¸I¨ì¤À¦æ¦r¤¸´N¥t°_¤@¦C
Case Chr(13)
ReDim Preserve ArrayString(J)
ArrayString(J) = LongWord
J = J + 1
K = 0
LongWord = ""
'¸I¨ìÂk¦ì¦r¤¸´N¸õ¹L
Case Chr(10)
Case Else
'¤¤¤å¦r³B²z
If Asc(ShortWord) < 0 Then
'¤@¦C°²³] 20 Byte ªø«×
If K < 19 Then
'¤@Ó¤¤¤å¨â Byte
K = K + 2
LongWord = LongWord + ShortWord
'º¡ 20 Byte ¥t°_¤@¦C
Else
ReDim Preserve ArrayString(J)
ArrayString(J) = LongWord
J = J + 1
K = 0
LongWord = ShortWord
End If
Else
If K < 20 Then
'¤@Ó^¤å¤@ Byte
K = K + 1
LongWord = LongWord + ShortWord
Else
ReDim Preserve ArrayString(J)
ArrayString(J) = LongWord
J = J + 1
K = 0
LongWord = ShortWord
End If
End If
End Select
Next
'¦pªGÁÙ¦³¦r¦ê¯d¦b LonWord
ùØ«h¦A¼W¤@¦C
If Len(LongWord) > 0 Then
ReDim Preserve
ArrayString(J)
ArrayString(J)
= LongWord
End If
'§âµ²ªG©ñ¨ì ListBox ùØÅã¥Ü
For I = 0 To UBound(ArrayString)
List1.AddItem
ArrayString(I)
Next
End Sub
Private Sub Form_Load()
Set Db = OpenDatabase("c:\test\mytest.mdb")
Set Rs = Db.OpenRecordset("student")
End Sub
Private Sub Form_Unload(Cancel As Integer)
Rs.Close
Db.Close
End Sub
¦^¯Á¤Þ
Eric ¼¶¼g©ó¤å³¹
¦p¦ó¨ú®ø DBGrid
ªº Delete Áä¥\¯à¡A¥H§K¨Ï¥ÎªÌ»~§R¸ê®Æ¡H
¦Ñ©Çµª¡G
Private Sub DBGrid1_BeforeColEdit(ByVal ColIndex As
Integer, ByVal KeyAscii
As Integer, Cancel As Integer)
If KeyAscii = vbKeyDelete Then
Cancel = True
End If
End Sub
¦^¯Á¤Þ
popo ¼¶¼g©ó¤å³¹
½Ð°Ý¦bvb¤¤¦p¦ó¦P®É§R°£¤@Ó¥H¤W¸ê®Æ®w¤¤ªº¸ê®Æ¡C¦U¸ê®Æ®w¤¤¦³¥DÁäȬÛÃöÁp,§R°£µ{¦¡À³¸Ó«ç»ò¼g¡H
¦Ñ©Çµª¡G
- .´N¦P¤@ MDB ªº¨âÓ Table ¨Ó»¡¡G
- ¥i¥H³]©w±j¢§R°£³sµ²¡A¥Î SQL
¶}±Ò¥DÃöÁpªí«á§R°£¥DÃöÁp°O¿ý§Y¦P®É§R°£³QÃöÁp°O¿ý¡C
- ¥Î SQL ³sµ²ªº ¨âÓ¸ê®Æªí
¡A«h¥u¯à§R°£³QÃöÁp¸ê®Æªí°O¿ý¡C
- ´N¨âÓ MDB ªº¨âÓ Table ¨Ó»¡¡G
- µLªk³]©w±j¢§R°£³sµ²¡C
- ¥Î SQL ³sµ²ªº ¨âÓ¸ê®Æªí
¡A«h¥u¯à§R°£³QÃöÁp¸ê®Æªí°O¿ý¡C
- n§R°£¥DÃöÁpªí°O¿ý¡A¶·¥t¶}³æ¿Wªº¥DÃöÁp
Recordset ¡A¥Î Find "Recordset!PrimaryKeyName=FiledValue
"ªº±Ôz¨Ó§R°£¥DÃöÁpªí°O¿ý¡C
¦^¯Á¤Þ
Pony ¼¶¼g©ó¤å³¹
½Ð°Ý¦p¦ó¨Ï¥ÎDAO¨Ó´¡¤J¤@Ó¹ÏÀɨì¸êͨ®w¤¤¡C¡C¡C¡C°£¤F¨Ï¥ÎDATA
CONTROL¤§¥~¡C¡C¡C¡C
¦Ñ©Çµª¡G
¹ï©ó MDB
¹ÏÀÉ¡A¸g§Ú̳\¦hºô¤Í´ú¸Õµ²ªG¦p¤U¡A§Æ±æ¤j®a°Ñ¦Ò¤@¤U¡A¦]¬°«ç»ò§â¹ÏÀÉ©ñÄæ¦ìùØ¡AÃö«Y¤é«á¨Ï¥Î«Ü¤j¡G
- °ò¥»¤W¥Î Access ©M¥Î VB
±N¹ÏÀÉ´¡¤JÄæ¦ì¤º¡A©¼¦¹µLªk¬Û¬y¥Î¡C
- ¦b Access
´¡¤Jªº¬O§t¦³«Ø¥ß¹ÏÀÉÀ³¥Îµ{¦¡ªºÀÉÀY¸ê®Æ¡A¬O¬°
OLE «¬ºA¸ê®Æ¡C
- VB ´¡¤Jªº¬O¤G¶i¦ì¸ê®Æ(¤£¥u¹ÏÀÉ¡A©Ò¦³¤G¶i¦ìÀɬҥi¥H¦¹¤è¦¡´¡¤J¡C)
- ¥Î Access ´¡¤Jªº¹ÏÀÉ¡A¯à¥Î VB ªº OLE Control
»P DataControl ³z¹L DataCombine ¤è¦¡ÂsÄý(·s¼WקïÁÙ¬O¦³°ÝÃD¡A¦pªG¦³ºô¤Íª¾¹D«ç»ò·s¼Wקï¡A½Ð§i¶D¤j®a¡C)
- ¥Î VB ´¡¤J¹ÏÀɦ³¤U¦C¨â¤è¦¡¡G
- AppendChunck ¤èªk¾A¥Î©ó¦bºÏºÐùؤw¦³ªº¹ÏÀÉ¡C
- ¦pªG¬Oµ{¦¡ùتºÃ¸¹Ï¡A¤£³z¹LºÏºÐ¡A¨º¥²¶·¥Î
PictureBox ©M DataControl ¬Û³sµ²¤èªk
- ¤£ºÞ¬O¨ººØ¤èªk¡A³£µLªk¦b Access ªº Form
ªí³æùسQÂsÄý¡C
- ©Ò¥H VB ªºÂk VB ¡AAccess ªºÂk Access
¡A§A¥²¶·¦b¹Ï§Î¸ê®Æ®w³W¹º¤§ªì¡A´N¨M©w¦n¬On¦b
VB ùإΩάO¦b Access ùإΡA°µ¨ì¤@¥b¤~§ïÅÜ¥D·N¡A©Ò¦³¦s¹Ï°Ê§@n«°µ¡C
¦^¯Á¤Þ
±H¥óªÌ: ¼B½å²»
Visual Basic ¤¤¦pªG¨Ï¥ÎExcelÀÉ®×,·í°µData1ªºData
Source¡A½Ð°Ý¬O§_¥i¥H¨Ï¥ÎSQL»yªk¨Ó¼W±j¨ä¬d¸ß¥\¯à,©Î¬OSQL¤@©wn·f¡A
°tAcessªº.MDBÀɤ~¯à¨Ï¥Î.¡H
¦Ñ©Çµª¡G
- SQL ¦b DAO
ùتº¨Ï¥Î¡A´N¿ï¨ú¬d¸ß¨Ó»¡¡A¤£¤À¸ê®Æ¨Ó·½¡A¥un¯à¶}´N¯à¥Î¡C
- ¦ý¦b§ó·s©Îקï¤W¡A¤£¦P¸ê®Æ¨Ó·½¦³¤£¦Pªº¨î¡C
±H¥óªÌ: ¼B½å²»
«Ü©êºp¦A¦¸¥´ÂZ§A,®Ú¾Ú§Aªº»¡ªk"SQL ¦b
DAO ùتº¨Ï¥Î¡A¤£¤À¸ê®Æ¨Ó·½¡A¥un¯à¶}´N¯à¥Î",¦ý¬O§Ú¤@¦A¸ÕÅç¤@¦A®À§é,§Ú¬Æ¦Ü¨Ï¥Î¸ê®Æ®wºÞ²zûVisData¤¤ªºSQL¬d¸ß²£¥Í¾¹,¦ý¬OÁ`¬O±o¨ì¦p¤Uªº¿ù»~°T®§:
"The following Error occured: FROM¤l¥y¤¤ªº»yªk¿ù»~¡C¼Æ¥Ø:3131
Åã¥ÜData Access Errors
¶°¦Xª«¥ó¶Ü?" ¤U¦C¬O§Ú¸Õ¹LªºSQL³¯z¥y(Excel
ÀÉ®×:Piping.xls,Work sheet:Pipe,¨ä¤¤¦³¤@Ófield:Price):
- SELECT * FROM Pipe$ WHERE Price = 150
- SELECT * FROM Pipe$ WHERE Price = 150
- Select * From Pipe$ Where (Pipe$.Price = '150' )
- Select Pipe$.* From Pipe$ Where (Pipe$.Price = '150'
)
- Select * From Pipe$ Where Pipe$.Price = '150'
¦Ñ©Çµª¡G
Option Explicit
Dim Db As Database
Dim Rs As Recordset
Private Sub Form_Load()
Dim SqlString As String
SqlString = "SELECT * FROM [Pipe$]
WHERE »ù¿ú = 20"
'---------------------------------^^^^^^^^
'------------------------½Ð°O±o¥[ "["¡A"]"
²Å¸¹
Set Db = OpenDatabase("c:\temp\book1.xls",
False, False, "Excel 8.0;")
Set Rs = Db.OpenRecordset(SqlString)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Rs.Close
Db.Close
End Sub
¦^¯Á¤Þ
David Wong ¼¶¼g©ó¤å³¹
½Ð°Ý¦b VB 5.0 ªº DBGrid ¤¤¥i¥H³]©w¬Y¤@Ó¯S©w
Cell ªº enable ÄݩʶܡH
¦Ñ©Çµª¡G
- DbGrid ªº Column ª«¥ó¦³Ó Locked
ÄÝ©Ê¥i¥H³]©w¨¾¼g¡A¦ý¨º¬O¾ãÄæ³]©w¡A³æ¤@
Cell ¨ÃµL¬ÛÃöÄÝ©Ê¡C
- §ÚÌ¥i¥H¥Îµ{¦¡¥[¥HÅܳq¡A´N¬O¦bn³]©w
Unable ªº Cell ¤W°O¿ý¨ä Col & Row ¡A¨Ã¦b
BeforeColEdit ¨Æ¥ó¤¤¨ú®ø¨ä½s¿è°Ê§@¡A½d¨Ò¦p¤U¡G
'´ú¸Õ¥»½d¨Ò½Ð©ó Form ¤W¥¬¸m Command1,Label1,Data1,DbGrid1
Option Explicit
Dim ColRec As Integer
Dim RowRec As Integer
'°O¦í¥Ø«e Cell ¦b¾î¶b¤ÎÁa¶b¦ì¸m
Private Sub Command1_Click()
ColRec = DBGrid1.Col
RowRec = DBGrid1.Row
End Sub
Private Sub DBGrid1_BeforeColEdit(ByVal ColIndex As
Integer, ByVal KeyAscii
As Integer, Cancel As Integer)
'¦pªG¥Ø«e Cell
¬O¦¥ý³QÂê¦íªº¡A«h¨ú®ø½s¿è°Ê§@¡C
If DBGrid1.Col = ColRec And DBGrid1.Row
= RowRec Then
Cancel = True
End If
End Sub
Private Sub DBGrid1_RowColChange(LastRow As Variant,
ByVal LastCol As
Integer)
'Åã¥Ü¥Ø«e Cell ½s¿èª¬ªp¡C
If DBGrid1.Col = ColRec And DBGrid1.Row
= RowRec Then
Label1.Caption
= "Àx¦s®æµLªk½s¿è"
Else
Label1.Caption
= "Àx¦s®æ¥i¥H½s¿è"
End If
End Sub
Private Sub Form_Load()
Command1.Caption = "Âê¦íÀx¦s®æ"
ColRec = -1
RowRec = -1
End Sub
XXX ¼¶¼g©ó¤å³¹
DAO ¦p¦ó«Å§i(©Î³]©w) ¤@¦¸Recordset(DataBase)¡AÅý¥L¯à¦A¦hÓForm¤¤¨Ï¥Î,¤£¥Î¨CÓForm³£³]©w?
¦Ñ©Çµª¡G
- Public Rs As Recordset
- ³o»ò²³æªº½d¨Ò¤]©ñ¶i¨Óªº¥Øªº¬O´£¿ô¤j®a¡A«Ü²³æ¸Ñ¨Mªº°ÝÃD¡A¦³®É¤]·|Åý¤HÆp¤J¤û¨¤¦y¡C
¦^º¶