Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server Scripts
Message
 
 
To
25/12/2002 20:49:39
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00735761
Message ID:
00735773
Views:
7
You can use SQL-DMO to run sql-scripts. See Re: SQL Scripts Message #708081 for sample code. SPT is preferable way to execute SQL SERVER stored procedures.
lcConnStr = "DRIVER=SQL Server;" + ;
	"UID=< user name >;" + ;
	"PWD=< password >;" + ;
	"DATABASE=< database >;" + ;
	"SERVER=< server >;" 

=SQLSETPROP(0,'DispLogin',3)         && Disable ODBC login dialog
=SQLSETPROP(0,'DispWarnings',.F.)    && Disable ODBC error dialog
lnConn = SQLSTRINGCONNECT(lcConnStr)
IF lnConn < 0
  * Connection unsecsessfull, use AERROR() to get error info and process it
ENDIF

lnResult = SQLEXEC(lnConn, [EXEC mystoredproc])
IF lnConn < 0
  * Unsecsessfull execution, use AERROR() to get error info and process it
ENDIF
>
>Is there a recommended way to run a sql server script and/or stored procedure direct from a Foxpro App. Is there any information I can look up.
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform