Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLPREPARE Pass-through
Message
From
25/03/1999 09:58:49
Robert Byrd
National Association of Homebuilders
Washington, District of Columbia, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQLPREPARE Pass-through
Miscellaneous
Thread ID:
00201855
Message ID:
00201855
Views:
36
I want to execute a SQLPREPARE that passes a vaiable for the table name to be queried. It currently looks like this:

l_cName = "SureShot"


=sqlprepare(l_oConn.r_nConvar,"EXECUTE usp_LMSGenOutput 65252, ?l_cName")
=sqlexec(l_oConn.r_nConvar)

=sqlprepare(l_oConn.r_nConvar,"SELECT * FROM ?l_cName","cGenOutput")
=sqlexec(l_oConn.r_nConvar)


The first SQLPREPARE works just fine. The stored procedure creates a permanent table named . However, the secong SQLPREPARE returns nothing. It does not generate a cursor at all.

What am I doing wrong?

Bob
Database Development Team
Next
Reply
Map
View

Click here to load this message in the networking platform