Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pass-through character limits?
Message
 
À
07/12/1998 11:44:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00164772
Message ID:
00164850
Vues:
26
John,

I know if you pre-write a stored procedure, you can call it with SQLEXEC(), but I am talking about creating a stored procedure from the front-end program that may require some dynamic changes in what the final SQL statement may have. Ex: different data sort, going against different sub-queries, etc.

Lets assume I have a select statement that has 15 fields from table A and another 10 fields from table B, and the resulting SQL statement would be to
large to send as a normal SQL-SELECT call...

select a.field1, a.field2,..., a.field15, b.field1, b.field2, ..., b.field10
from mytable1 a, mytable2 b
where a.keyid1 = b.keyid1
order by 1, 5, 12

Since this would exceed the 255 limit, how could I create the back-end procedure

CREATE PROCEDUR BOGUS1 AS
(select statment...)


Then I could use the SQLEXEC( lnHandle, 'BOGUS1', mycursor )

Then delete the stored procedure when I am done.




>Hi Don ---
>
>>If the limit is 255, would it then be possible to create a stored procedure on the back-end via odbc and pass a series of strings to build the procedure and then execute it for the proper results?
>
>Yes. You can then run the stored procedure with SQLEXEC() and return a result cursor from the same: Here's an example:
>
>cState="FL"
>=SQLEXEC(nConnectionHandle,'sp_getstates "'+cState+'"',mycursor)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform