Strange error in tlocalindex.find:
----------------------------------
#0  0040B416 :0 fpc_raiseexception()
#1  00547A87 mdb.pas:2142 DATABASEERROR(MSG=0xecc90 'Invalid find
parameters.'#13#10'qryAcnt1NodesListfield office_code wanted vtype: 18
actual vtype: 15')
#2  005BC0E3 msebufdataset.pas:9358 PARAMERROR(AMESSAGE=0x1190a0
'qryAcnt1NodesListfield office_code wanted vtype: 18 actual vtype: 15')
#3  005BC2CB msebufdataset.pas:9389 TLOCALINDEX__FIND(AVALUES={},
AISNULL={}, ABOOKMARK={RECNO = 2, RECORDPO = 0x4b4fc10}, ABIGGER=false,
PARTIALSTRING=false, NOCHECKBROWSEMODE=true, highAVALUES=0, highAISNULL=-1,
this=<error reading variable>)
#4  005F9E52 dbutils.pas:76 CLEAN4NOTFOUND(FIELDREAD=0xf2fd0,
FIELDWRITE=0xf39e0, LOCAL_IDX_NUM=0)
#5  0043B263 dmmain.pas:780
TDMMAINMO__ACNT1NODELLISTAFTERREFRESH(DATASET=0xaedf0, this=<error reading
variable>)
#6  00549DF5 mdb.pas:2896 TDATASET__DOAFTERREFRESH(this=<error reading
variable>)
#7  0054D1C6 mdb.pas:4650 TDATASET__REFRESH(this=<error reading variable>)
#8  00569C9D msedb.pas:8021 TDSCONTROLLER__DOREFRESH(SENDER=0x0,
this=<error reading variable>)
#9  00569D20 msedb.pas:8039 TDSCONTROLLER__REFRESH(RESTORERECNO=false,
DELAYUS=-1, this=<error reading variable>)
#10  005C0BAC msesqldb.pas:992
TPARAMSOURCEDATALINK__RECORDCHANGED(AFIELD=0x0, this=<error reading
variable>)
#11  005C0C58 msesqldb.pas:1010 TPARAMSOURCEDATALINK__LOADED(this=<error
reading variable>)
#12  005C16EC msesqldb.pas:1245 TFIELDPARAMLINK__LOADED(this=<error reading
variable>)
#13  0045457F mclasses.pas:5469 NOTIFYGLOBALLOADING()
#14  0047A55F mseclasses.pas:2839 INITMSECOMPONENT(INSTANCE=0xaac80,
ROOTANCESTOR=<incomplete type>, NEEDSLOADING=false)
#15  0047A7CA mseclasses.pas:2950 LOADMSEMODULE(INSTANCE=0xaac80,
ROOTANCESTOR=<incomplete type>)
#16  004B9A63 msedatamodules.pas:152 TMSEDATAMODULE__CREATE(AOWNER=0xa9c60,
LOAD=true, vmt=0x0, this=<error reading variable>)
#17  004B9895 msedatamodules.pas:139 TMSEDATAMODULE__CREATE(AOWNER=0xa9c60,
vmt=0x1, this=<error reading variable>)
#18  00479EDC mseclasses.pas:2061 CREATEMODULE(AOWNER=0xa9c60,
INSTANCECLASS=<incomplete type>, REFERENCE=void)
#19  0047721D mseapplication.pas:1673
TCUSTOMAPPLICATION__CREATEDATAMODULE(INSTANCECLASS=<incomplete type>,
REFERENCE=void, this=<error reading variable>)
#20  00402250 podpiska.pas:22 main()
-----------------
replacing bookmark type from "string" to "bookmarkty" doesn't fix.

The call code is:
-----------------
procedure clean4notfound(
    const fieldread, fieldwrite: tfield;
    const local_idx_num: integer = -1
);
var
    bm: bookmarkdataty{string};
    fld: tfield;
sr,sw: widestring;
begin

if (fieldread = nil) or (fieldwrite = nil) then exit;
if not ((fieldread.dataset.active) and (fieldwrite.dataset.active)) then
exit;

with fieldread, (dataset as tmsesqlquery) do begin
  if (fieldwrite.dataset.state in [dsBrowse,dsInactive]) then exit;
    if fieldread is tmselongintfield then begin
        if local_idx_num >= 0 then begin
            if not indexlocal[local_idx_num].find(
                [fieldwrite.asinteger],[],bm,
                false,false,true
            ) then begin
                fieldwrite.clear;
            end;
        end;
    end else if fieldread is tmsestringfield then begin
        if local_idx_num >= 0 then begin
            if not indexlocal[local_idx_num].find( //   <<<<<<<<< HERE <<<<<
                [fieldwrite.aswidestring],[],bm,
                false,false,true
            ) then begin
                fieldwrite.clear;
            end;
        end;
    end;
end;
end;
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to