Information générale
Forum:
Microsoft SQL Server
Hope this helps:
1. Create your procedure as normal;
2. Open Visual Foxpro;
3. In the Command Window type the following: ?SQLSTRINGCONNECT("driver={sql server}");
4. You will get an SQL Server Login screen. Login as normal. In the background, you should get a number 1 which gives you your connection number (this should never be negative);
5. The next command is ?SQLEXEC(connection number i.e. 1,"EXECUTE your procedure name","output name"). If you have date parameters for example and your procedure is called test_proc, output is called test_output and connection number is 1, your command will be ?SQLEXEC(1,"EXECUTE test_proc '24 November 2003'","test_output"). Your output will be in your foxpro data session window.
To disconnect from the SQL Server type ?SQLDISCONNECT(1) - 1 being the connection number.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement