On 2016-03-17 5:54, ggoo...@yahoo.com [firebird-support] wrote: > I am querying a Firebird 1.5.3 database with python code using the > python firebirdsql module. All works well (query returns values as > expected) with up to 10 columns from two tables, but when I add an > 11th column I get the error: > > “NameError: global name ‘INFO_SQL_SELECT_DESCRIBE_VARS’ is not > defined” from the SQL execute statement. If I remove any one of the > 11 columns from the query it works so it doesn’t appear related to a > bad column name. > > The database is not one I created, so I don’t know if the creator > did something to lock it down in some way, or if Firebird is even > able > to do this. > > My SQL query is as follows … > > strquery="SELECT t.measured_datetime , t.results_dose, > t.results_axsym, t.results_trsym, \ > t.results_qaflat, t.signature, t.set_key, d.beam_on_time, \ > d.d24_counts, d.d34_counts, d.d44_counts \ > FROM dqa3_trend t \ > JOIN tomo_data d ON (t.data_key = d.data_key) \ > WHERE extract (month from t.measured_datetime) = extract (month from > CURRENT_DATE) \ > AND extract (year from t.measured_datetime) = extract (year from > CURRENT_DATE) \ > AND (t.set_key=25 OR t.set_key=26)" > > Any suggestions as to what might be causing this observed behaviour?
Sounds like a problem in the driver, it can't find a constant by the looks of it. Make sure you are using the latest version, and otherwise report a bug. As a side note: 1.5.3 is rather old (even for the 1.5.x series itself), you really should consider upgrading (preferably to 2.5, but otherwise at least to 1.5.6). Mark