Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refresh help
Message
From
03/10/2004 09:55:06
 
 
To
03/10/2004 09:45:39
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00948318
Message ID:
00948319
Views:
16
Hi Paul,

I am not sure if this will fix your problem, but instead og
SELECT 0
USE AuditCls 
APPEND BLANK
replace userid WITH gcNovellId, sdate WITH DATETIME(), numRec WITH   nTltRecs,ieflag WITH "I"
USE
I suggest
insert into AuditCls (userid, sdate, numRec, ieflag) values (gcNovellId, datetime(), nTltRecs, "I")
The insert code replaces many lines of code, and is usually faster.

By the way, you don't need the SELECT Top1 line, SQL SELECT automatically also selects the result cursor.


>Hello,
>
>I have a click event in Import button in myform.scx to append a record :
>
>
>
> SELECT 0
>   USE AuditCls
>   APPEND BLANK
>   replace userid WITH gcNovellId, sdate WITH DATETIME(), numRec WITH   nTltRecs,ieflag WITH "I"
>   USE
>
>**and  the TXTLASTIMPORTDATE textbox Init event in myform.scx :
>
>LOCAL lcLastImportDate,lctestdate
>
>SELECT TOP 1 Sdate,userid ;
>	FROM AuditCls ;
>	GROUP BY 1 ;
>	ORDER BY 1 DESC WHERE IEFLAG = "I" ;
>	INTO CURSOR top1
>
>SELECT top1
>
>lcLastImportDate = sdate
>
>lcLastImportDate = TRANSFORM(lcLastImportDate,'@YL') +' by '+userid
>
>thisform.TXTLASTIMPORTDATE.Value=lcLastImportDate
>
>Thisform.txtLastImportDate.Refresh()
>
>
>
>Each I append a record to auditcls table, I want my txtlastimportdate to update instantly but ThisForm.txtlastImportDate.refresh() does not work.
>
>Any help to fix my codes would be appreciated ?
>
>TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform