So doing some more routing around on the lists I saw this advice
FWIW you
might want to call the query or execute methods directly on the DA
connection object if they are supported.
Therefore my db connection object is
ado_db_connection. Modifying my code to the below and calling the
query
ok, thanks Duncan
ul
li tal:define=query nocall:here/testquery tal:repeat=result
python:query(id='IT')
span tal:replace=result/lastnamelastname goes here/span
/li
/ul
works! I went down a blind alley with calling the database adapter due to
confusion over the error message produced. Backs up my
ps for completeness
here is the testquery ZSQL which works fine when tested in the ZMI and
manually inputting the id variable.
select * from tblEmployees where department = (dtml-sqlvar id
type=string) order by 'location'
I have 'id' in the argument field
Thanks
On 11/2/07, michael nt milne
Hi Josef
ul
li tal:define=query here/testquery tal:repeat=result
python:query(id='IT')
span tal:replace=repeat/resultfirstname goes here/span
/li
/ul
gives the same
AttributeError: Results instance has no __call__ method
As does
span tal:replace=repeat/result/firstnameFirst Name/span
As
The only point being backed up by this thread, IMO, is that Thou
shalt not code in TALES.
Stefan
On 2. Nov 2007, at 12:53, michael nt milne wrote:
Backs up my point about more
friendly and usable error messages.
--
Anything that, in happening, causes something else to happen,
causes
So use DTML? Or NKOTB? :-)
On 11/2/07, Stefan H. Holek [EMAIL PROTECTED] wrote:
The only point being backed up by this thread, IMO, is that Thou
shalt not code in TALES.
Stefan
On 2. Nov 2007, at 12:53, michael nt milne wrote:
Backs up my point about more
friendly and usable error
1) don't make spaces around = in HTML attributes:
tal:define=query here/testquery
a mistake
2) Why do you use repeat['result'] ? Can you point us to documentation
where did you read it ?
tal:replace=result/firstname should work as expected or
tal:replace=python:result[