Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Connection String in a Connection Object
Message
From
05/11/1998 12:53:02
Robert Byrd
National Association of Homebuilders
Washington, District of Columbia, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
SQL Connection String in a Connection Object
Miscellaneous
Thread ID:
00154910
Message ID:
00154910
Views:
55
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
Next
Reply
Map
View

Click here to load this message in the networking platform