Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Capturing the output clause
Message
De
11/08/2009 14:41:05
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01417348
Message ID:
01417377
Vues:
42
I got the thing to work. It may not be the cleanest but it will suit my needs at this point. Basically what I am doing is including the statement "Output inserted.InvRecordNO" in the SQL. If the SQL succeeds then I call "=SQLEXEC(dbHandle,"Select * from inserted") " and then r=VAL(sqlresult.invRecordNo)" . This returns the new primary key to me. I hate to hit the database twice and think it very strange that SQL Server would return the integer invRecordNo as a character string.

Thank you all for your help!
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform