Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update conflict
Message
 
 
To
18/11/2010 09:50:54
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01489567
Message ID:
01489586
Views:
61
Why go half way?
Select NVL(max(itemnum), 0) from inspdata where jobnum==lnJobnum into array lnMaxItem
RETURN lnMaxItem[1]
Also if table/view is buffered it'll require
WITH (BUFFERING = .T.)
>It may not be related, but instead of Calculate, I would use a SQL Select statement instead, since it doesn't move the record pointer.
>
>IF !EOF('inspdata') AND !BOF('inspdata')
>   local lnjobnum
>   lnJobnum=inspheader.jobnum
>   Select max(itemnum) from inspdata where jobnum==lnJobnum into array lnMaxItem
>   RETURN lnMaxItem
>ELSE
>   Return 0
>endif
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform