Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fatal Error Trouble
Message
 
 
To
27/10/2005 10:24:00
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01062625
Message ID:
01064990
Views:
21
Steve,

Are you sure you are getting back a decent result from your SPT? Why don't you let the backend do the max()? That's better than bringing a bajillion rows over the wire only to be interested in only one of them.

>I am getting a Fatal Error Exception code: C0000005 on the '*' line of the following code.
>
>lParam typeOfResult, whatName
>Local nextProgramIndex
>nextProgramIndex = 1
>
>getProgramDataIndexString = "Select recseq From engpmtbl20"
>		
>If SQLEXEC(esglobal.as400_connection2, getProgramDataIndexString, 'getProgramDataIndexQuery') <> -1 Then
>
>If reccount('getProgramDataIndexQuery') > 0 Then
>Select Max(recseq) As recseq From getProgramDataIndexQuery InTo Cursor getProgramDataIndexQuery2
>
>If reccount('getProgramDataIndexQuery2') > 0 Then
>* nextProgramIndex = getProgramDataIndexQuery2.recseq
>Return nextProgramIndex + 1
>Else
>Return 1
>EndIf
>Else
>Return 1
>EndIf
>				
>Else
>If Aerror(esglobal.globalerrorflag) > 0 Then
>	MessageBox(esglobal.globalerrorflag(2))
>EndIf
>Return 0 &&Logon Support is not running
>EndIf
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform