Subject RE: [IBO] Using bookmarks with IB_Query1, to select, then only dispaly selected resultset in IB_Query2?
Author Adrian Wreyford
Thanks Andreas!



-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
Of Andreas Pohl
Sent: 07 August 2005 10:46 PM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Using bookmarks with IB_Query1, to select, then only
dispaly selected resultset in IB_Query2?



Hello Adrian Wreyford,

> What I now need to do is to create IB_Query2, that is equivalent to only
the
> bookmarked records in IB_Query1

you can retrieve all primary keys from
query1.SelectedBookmarks-StringList and store it in a separate
stringlist ("transforming" bookmark value into pk value). Then copy
query1.sql.text to query2.sql.text and add a in()-clause to query2:


query2.sql.text:=query1.sql.txt;
query2.SQLWhere.Add(format(' and %s in(%s)
',[pkfieldname,pkstringlist.commatext]));

--
Andreas



___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !




SPONSORED LINKS


Database
<http://groups.yahoo.com/gads?t=ms&k=Database+development+software&w1=Databa
se+development+software&w2=Resume+database+software&w3=Database+software&w4=
Database+management+software&w5=Customer+database+software&w6=Oracle+databas
e+software&c=6&s=184&.sig=kiojQHghKf8pIKxc5DRl1g> development software

Resume
<http://groups.yahoo.com/gads?t=ms&k=Resume+database+software&w1=Database+de
velopment+software&w2=Resume+database+software&w3=Database+software&w4=Datab
ase+management+software&w5=Customer+database+software&w6=Oracle+database+sof
tware&c=6&s=184&.sig=cTug4JqdiJ6JKSrvoofcvw> database software

Database
<http://groups.yahoo.com/gads?t=ms&k=Database+software&w1=Database+developme
nt+software&w2=Resume+database+software&w3=Database+software&w4=Database+man
agement+software&w5=Customer+database+software&w6=Oracle+database+software&c
=6&s=184&.sig=hYqdQAVF-BsgWHJkY0zV5Q> software


Database
<http://groups.yahoo.com/gads?t=ms&k=Database+management+software&w1=Databas
e+development+software&w2=Resume+database+software&w3=Database+software&w4=D
atabase+management+software&w5=Customer+database+software&w6=Oracle+database
+software&c=6&s=184&.sig=grfTXzqVa9t5ahmLsEOefg> management software

Customer
<http://groups.yahoo.com/gads?t=ms&k=Customer+database+software&w1=Database+
development+software&w2=Resume+database+software&w3=Database+software&w4=Dat
abase+management+software&w5=Customer+database+software&w6=Oracle+database+s
oftware&c=6&s=184&.sig=USZKp_-yTTYnoT4Mf958fQ> database software

Oracle
<http://groups.yahoo.com/gads?t=ms&k=Oracle+database+software&w1=Database+de
velopment+software&w2=Resume+database+software&w3=Database+software&w4=Datab
ase+management+software&w5=Customer+database+software&w6=Oracle+database+sof
tware&c=6&s=184&.sig=fIJDPok0vNmIaQJ9Xi4p_g> database software



_____

YAHOO! GROUPS LINKS



* Visit your group "IBObjects
<http://groups.yahoo.com/group/IBObjects> " on the web.


* To unsubscribe from this group, send an email to:
IBObjects-unsubscribe@yahoogroups.com
<mailto:IBObjects-unsubscribe@yahoogroups.com?subject=Unsubscribe>


* Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/> Terms of Service.



_____



[Non-text portions of this message have been removed]