Find Max(RecID)

Charles Yeomans yeomans at desuetude.com
Sat May 15 13:51:55 CDT 2004


On May 15, 2004, at 10:16 AM, Ruslan Zasukhin wrote:

> On 5/15/04 5:05 PM, "RyHoRuK" <RyHoRuK at gmx.de> wrote:
>
>> Hi,
>>
>> is this the fastest way to find in a table the max(RecID)?
>>
>>  SQLString="select RecID FROM Konten WHERE Konto_Typ=1"
>>  CurKontoCheck=meineDatenbank.SQLselect(SQLString, kV_Server,
>> kV_NoLocks, kV_Random)
>>  res=CurKontoCheck.LastRecord
>>  MaxRecID=CurKontoCheck.ulongField("RecID").value
>
> I think no.

And I can tell you that "SELECT Mac(recID) FROM SomeTable" isn't  
either; the result is a crash.

Charles Yeomans

Thread 0 Crashed:
0   Plugin                         	0x00772f00  
GoToRecord__15OBL_JoinSet_RamFUl + 0x10
1   Plugin                         	0x0076f9a8  
LoadField__24OBL_CursorTable_IndirectFP13FBL_BaseFieldUl + 0x78
2   Plugin                         	0x007694d4  
BuildSingleRecord__19OBL_CursorTable_TmpFP10OBL_ParserR24OBL_CursorTable 
_Indirect + 0x4d4
3   Plugin                         	0x00768688  
BuildRecords__19OBL_CursorTable_TmpFP10OBL_ParserR24OBL_CursorTable_Indi 
rect + 0x98
4   Plugin                         	0x007679e0  
BuildMultiplicationTable__19OBL_CursorTable_TmpFP10OBL_Parser + 0x70
5   Plugin                         	0x00767540  
BuildTable__19OBL_CursorTable_TmpFP10OBL_Parser + 0x30
6   Plugin                         	0x006ebc80  
BuildCursorTable__10OBL_CursorFv + 0x30
7   Plugin                         	0x006eb224 Execute__10OBL_CursorFv  
+ 0x64
8   Plugin                         	0x006ec758  
ExecuteSql_WithNoUnion__10VDK_CursorFPCc + 0x48
9   Plugin                         	0x006ec6c4  
ExecuteSQL__10VDK_CursorFPCc + 0x24
10  Plugin                         	0x006dbfd8  
SqlSelect__12VDK_DataBaseFPCc15ECursorLocation9ELockType16ECursorDirecti 
on + 0x68
11  Plugin                         	0x006447c8  
DataBase_SqlSelect_aux__FP16REALobjectStructP16REALstringStructiii +  
0xa8
12  Plugin                         	0x0064453c  
DataBase_SqlSelect__FP16REALobjectStructP16REALstringStruct + 0x1c
13  main                           	0x000e3a04 0xb0000 + 0x33a04
14  <Unknown memory fragment>      	0x00456504 0x405000 + 0x51504
15  <Unknown memory fragment>      	0x004fb118 0x405000 + 0xf6118
16  <Unknown memory fragment>      	0x0049ca64 0x405000 + 0x97a64
17  <Unknown memory fragment>      	0x004ca000 0x405000 + 0xc5000
18  <Unknown memory fragment>      	0x004ca5ec 0x405000 + 0xc55ec
19  com.apple.HIToolbox            	0x927d2384 DispatchEventToHandlers  
+ 0x150



More information about the Valentina mailing list