I have created a connection object cusConnObj whose INIT code is...
CREATE DATA worktbls\dataconn
CREATE CONNECTION nConVar CONNSTRING &p_cConnString
g_oApp.r_nConVar = SQLCONNECT('nConVar')
RETURN g_oApp.r_nConVar
...where r_cVonVar is a property in my application object and p_cConnString is a valid SQL Server connection string.
I call this from a reporting procedure as follows...
SET CLASSLIB TO LM2CUSTOM ADDITIVE
l_oConnection=CREATEOBJECT("cusConnObj")
=SQLPREPARE(l_oConnection,"Select l.li_name, g.gn_desc, count(nl.na_liid) cnt from name n, namelist nl, list l, gender g where n.na_id = nl.na_id and nl.na_liid *= l.li_id and n.na_gender *= g.gn_id GROUP BY l.li_name, g.gn_desc","_temp")
... which results in an error : "Function argument value, type or count is invalid."
What's wrong with this picture?
Bob
Database Development Team