Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DATAENVIRONMENT~
Message
From
29/12/1999 12:33:40
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00308730
Message ID:
00309930
Views:
40
Jim:

in my main .prg , i hv a function to open all the DB which needed.
i use the command "use DBname exclusive in 0" to open all these DB.
both the form.init contain the similar code:

WITH THISFORM.DATAENVIRONMENT
.ADDOBJECT('CURSOR1','Cursor')
.CURSOR1.CURSORSOURCE = DBF_path + 'DB'
.CURSOR1.ALIAS = 'DB'
.CURSOR1.EXCLUSIVE = .T.
ENDWITH


SELECT DB
WITH THISFORM.GRID
.RECORDSOURCE = 'DB'
.COLUMNCOUNT = 6
FOR I = 1 TO 6
.COLUMNS[I].FORECOLOR = RGB(0,0,0)
.COLUMNS[i].REMOVEOBJECT('Text1')
.COLUMNS[i].ADDOBJECT('Text1','Textbox')
.COLUMNS[i].HEADER1.CAPTION = GRD_INFO[I,1]
.COLUMNS[i].HEADER1.ALIGNMENT = 0
.COLUMNS[i].CONTROLSOURCE = GRD_INFO[I,2]
.COLUMNS[i].VISIBLE = .T.
.COLUMNS[i].SPARSE = .T.
ENDFOR
ENDWITH
*GRD_INFO contain field name and field header for display

my delete command button.click:

SELECT DB
GO TOP
LOCATE FOR ALLTRIM(unique_no) = ALLTRIM(DB.unique_no)
DO WHILE FOUND()
DO WHILE RLOCK() = .T.
DELETE
CONTINUE
UNLOCK
EXIT
ENDDO
ENDDO
WAIT WINDOW "Deleting......." TIMEOUT 3
PACK

every time when i click the button , both the grid in seprated form display blank,is there another method to do the delete function?!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform