Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing a Stored Procedure from VFP 6 1

Status
Not open for further replies.

LeonelSanchezJr

Programmer
Jan 26, 2001
522
US
What is the syntax to execute a SQL 2000 Stored Procedure from within Visual FoxPro?

Will the result be available in the Data Session like the regular data is?
 
Try this..
Executes the 'sp_tables' stored procedure and retuns data to the cursor 'cResults'

ConnString = "DRIVER=SQL Server;SERVER=[Server Name];UID=;PWD=;DATABASE=[Database Name]"

Handle = SQLSTRINGCONNECT(ConnectionString)

SQLEXEC(Handle, 'sp_tables', 'cResults')
 
That should of course be

ConnString = "DRIVER=SQL Server;SERVER=[Server Name];UID=;PWD=;DATABASE=[Database Name]"

Handle = SQLSTRINGCONNECT(ConnString)

SQLEXEC(Handle, 'sp_tables', 'cResults')
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top