General information
Category:
Coding, syntax & commands
Title:
Can I Using SQL-SELECT
01 DEFINE CLASS ClassOpenCmdButton AS CommandButton
02 FUNCTION Click
03 FileName=GETFILE("DBF","Phone Book","Open",0)
04 IF !EMPTY(FileName)
05 CLOSE DATABASE
06 USE &FileName
07 DO WHILE !EOF()
08 AddIndex=THISFORM.ObjListBoxSource.NewItemId+1
09 THISFORM.ObjListBoxSource.AddListItem(TO,AddIndex,1)
10 THISFORM.ObjListBoxSource.AddListItem(ATTN,AddIndex,2)
11 THISFORM.ObjListBoxSource.AddListItem(FAXNO,AddIndex,3)
12 SKIP
13 ENDDO
14 CLOSE DATABASE
15 THISFORM.ObjListBoxSource.Requery
16 ENDIF
17 RETURN
18 ENDDEFINE
19 DEFINE CLASS ClassListBoxSource AS ListBox
20 ColumnCount=3
21 ColumnLines=.F.
22 ColumnWidths="280,200,200"
23 RowSourceType=0
24 Sorted=.T.
25
26 FUNCTION DblClick
27 RemoveIndex=THIS.ListIndex
28 AddIndex=THISFORM.ObjListBoxTarget.NewItemId+1
29 THISFORM.ObjListBoxTarget.AddListItem(THIS.List(RemoveIndex,1),AddIndex,1)
30 THISFORM.ObjListBoxTarget.AddListItem(THIS.List(RemoveIndex,2),AddIndex,2)
31 THISFORM.ObjListBoxTarget.AddListItem(THIS.List(RemoveIndex,3),AddIndex,3)
32 THIS.RemoveItem(RemoveIndex)
33 RETURN
34 ENDDEFINE
Hi!
In the line 07 - 13, Can I using SQL-SELECT? If yes, how change it?
Thank you!
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only