Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Connection String in a Connection Object
Message
De
05/11/1998 12:53:02
Robert Byrd
National Association of Homebuilders
Washington, District de Colombia, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
SQL Connection String in a Connection Object
Divers
Thread ID:
00154910
Message ID:
00154910
Vues:
56
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform