General information
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.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only