Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple VFP program to backup SQL Server database
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00857511
Message ID:
00857681
Vues:
25
>You could try this as well:
>
>
>LOCAL lcSQLScript, loConnection
>
>loConnection = CREATEOBJECT('ADODB.CONNECTION')
>loConnection.Open("Provider=SQLOLEDB.1;User ID=MyUserName"+;
>	+";PWD=MyPassword"+;
>	+";Persist Security Info=False"+;
>	+";Initial Catalog=MyDatabaseName"+;
>	+";Data Source=MyServerName")
>
>lcSQLScript = ;
>"BACKUP DATABASE [MyDatabase] TO  DISK = N'C:\Backups\BackupFilename' "+;
>"WITH  INIT ,  NOUNLOAD ,  NAME = N'MyBAckupName',  NOSKIP ,  STATS = 10,  "+;
>"DESCRIPTION = N'MyBAckupName',  NOFORMAT "
>
>loConnection.Execute(lcSQLScript)
>
Thank you. Very educational.
What is the significance of those Ns in front of the quotes?

Alex
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform