Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 4 of 4 total |
External function and memory database |
Mon, Jul 28 2008 5:15 AM | Permanent Link |
Heiko Knuettel | Hi,
at application startup, I open a disk- and a memory database, and then copy the stored functions from the disk database to the memory database, so that I can use them later in the memory database context e.g. for a "create table as...". That works fine with internal SQL/PSM functions. But when using an external function, in this case flagset(value, flagno: Integer):Boolean, a simple function that just checks if a bit in a integer is set, I have some trouble. When executing the query "select * from diskdb.table where flagset(flags, 2)=false" in the disk database context (DataBaseName := 'disk'), I get the correct result set. But when executing the same query (with the diskdb qualifier) in the memory database context, I get an empty result set. Looks like a bug... Heiko |
Mon, Jul 28 2008 5:49 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Heiko
Two things 1. can you post the function 2. Have you tried it in EDBManager? Roy Lambert [Team Elevate] |
Mon, Jul 28 2008 7:03 AM | Permanent Link |
Heiko Knuettel | Roy,
The error shows in EDBManager. I could provide a sample project also, that is, if Tim doesn't see anything at first look. The external function is : procedure TEDBExternalModule1.EDBExternalModuleRoutine(const RoutineName: String); begin if ansiuppercase(RoutineName)='FLAGSET' then Params.ParamByName('result').AsBoolean := flagset(Params.ParamByName('intval').AsInteger, Params.ParamByName('flag').AsInteger); end; function TEDBExternalModule1.flagset(intval, flag: Integer): Boolean; begin result := (intval and (1 shl flag))<>0; end; FUNCTION "FLAGSET" (IN "intval" INTEGER, IN "flag" INTEGER) RETURNS BOOLEAN EXTERNAL NAME "extmodule" Heiko |
Mon, Jul 28 2008 4:30 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Heiko,
<< But when executing the same query (with the diskdb qualifier) in the memory database context, I get an empty result set. >> I'll check it out for 2.01 B2. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |