Consider the following code:

KomponistenIDField=hk_thisform.get_pyvisible("KomponistenID")
KomponistenID=KomponistenIDField.value()

dr=hk_drivermanager()
con=dr.new_connection("mysql")
con.connect()
db=con.new_database("musik")

query=db.new_resultquery()

query.set_sql("SELECT Komponisten.FirstName, Komponisten.FamName \
    FROM Komponisten WHERE ((Komponisten.KomponistenID = " + str(KomponistenID) 
+ " ))")
query.enable()
query.goto_first()
KompName=query.show_currentrow()

hk_thisform.show_warningmessage(str(KompName))

I have a database table with code snippets that I re-use where applicable, by 
copy, pasting and editing.
The above code snipped I have used many times for different purposes by simply 
editing the same according to circumstance. 

Hope it will also work for you.
Egbert



Robert Leleu <[EMAIL PROTECTED]> wrote: I'm trying to write a programmed query 
recovering the datas for a list 
of index-key values, itself recovered from previous steps in the 
application.

1/ I did not succeed first to get such a filter in QBE windows.
When I wrote the line
idkleunik=815
in the conditions
I got an active filter
I tried to write two lines, as follows
idkleunik=815
idkleunik=911
and I got no filer at all...

but just write these 3 lines
idkleunik=815
or
idkleunik=911

and it works

2/the corresponding set_filter operation in a script is

myfilter="idcleunik="+str(815)+" or idcleunik="+str(911)
ds.set_filter(myfilter,False)

now, of course the aim is to write the string myfilter by programmation






-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Hk-classes-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hk-classes-discuss


       
---------------------------------
 Yahoo! Answers - Get better answers from someone who knows. Tryit now.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Hk-classes-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hk-classes-discuss

Reply via email to