Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Scripts
Message
 
À
01/10/2002 16:36:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00706584
Message ID:
00708081
Vues:
36
This message has been marked as the solution to the initial question of the thread.
>How can I execute Sql Scripts in VFP? Is there an API or something ??
>
Silvio,

From this thread it appears that you have access to the SQL Server Enterprise Manager. If so, the easiest way to do this would be through SQL-DMO. This is a COM object that allows you to do just about anything (including re-write) the Enterprise Manager can do. For example
oSQL = CREATEOBJECT('SQLDMO.SQLServer')
oSQL.Connect(< server name >, < user name >, < password >)
oDatabase = oSQL.DataBases(< Database name >)
lccmnd = FILETOSTR(< SQL Script file >)
oDatabase.ExecuteImmediate(lccmnd)
Additionally there are ExecuteWithResults and ExecuteWithResultsAndMessages (two of them)methods.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform