Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Send a Multi-Lines Execution by SQL Pass-Through?
Message
 
To
15/08/2006 12:47:01
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
MS SQL Server
Miscellaneous
Thread ID:
01145641
Message ID:
01145643
Views:
20
This message has been marked as the solution to the initial question of the thread.
>Is it possible to do the 3 following lines in only one sqlexec()?
>If so, how to do that? Thank you!
>
>declare @FichsousId as varchar(40)
>set @FichsousId= (select id from fichsous where numcon = 11113)
>exec sp_deletesoumission @FichsousId, @UserName = 'mlevesque'

Yes:
TEXT TO lcSQL NOSHOW 
    declare @FichsousId as varchar(40)
    select @FichsousId = id from fichsous where numcon = 11113
    exec sp_deletesoumission @FichsousId, @UserName = 'mlevesque'
ENDTEXT
IF SQLEXEC(lnSQLH, lcSQL) < 0
   AERROR(laError)
   MessageBox(laError[1,2])
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform