Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread TDBISAMQuery AfterExecute problem
Sat, Jul 13 2013 12:07 PMPermanent Link

Aaron Taylor

Avatar

If i try to read the FieldList.Origin poperty in the afterexecute event it returns nothing.

works fine if i read it a second or more after.
Mon, Jul 15 2013 12:54 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Aaron,

<< If i try to read the FieldList.Origin poperty in the afterexecute event
it returns nothing.

works fine if i read it a second or more after.  >>

DBISAM query execution is not asynchronous, so this doesn't make any sense.

Are you using DBISAM with multiple threads ?  What version of Delphi are you
using ?  Is it 32-bit or 64-bit ?  Are you using the DBISAM Database Server
?  If so, is it 32-bit or 64-bit ?

Thanks,

Tim Young
Elevate Software
www.elevatesoft.com


Mon, Jul 15 2013 8:33 PMPermanent Link

Aaron Taylor

Avatar

Are you using DBISAM with multiple threads ?
No

What version of Delphi are you using ?
2010

Is it 32-bit or 64-bit ?
32

Are you using the DBISAM Database Server, If so, is it 32-bit or 64-bit ?
yes, 32bit running on SBS2011

if i do this it works fine, but if i move it to the AfterExecute event if fills the list box with blank items.

procedure TForm1.Button1Click(Sender: TObject);
var
 Cntr: word;
 Field: string;
begin
 qryMisc.ExecSQL;
 
 for Cntr := 0 to qryMisc.FieldList.Count - 1 do
 begin
   Field := qryMisc.FieldList[Cntr].Origin;
   ListBoxFields.Items.Add(Field);
 end;

end;
Sun, Jul 21 2013 3:06 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Aaron,

<< if i do this it works fine, but if i move it to the AfterExecute event if
fills the list box with blank items. >>

Duh, sorry, I should have known this one right away and told you when you
first asked.  I'm a little rusty on DBISAM stuff lately. Smile

You need to use the AfterOpen event handler instead - AfterExecute only
fires after executing individual SQL statements *in a script*.

If you have any other questions, please let me know.

Tim Young
Elevate Software
www.elevatesoft.com
Image