Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy database
Message
De
01/09/2019 07:52:14
 
 
À
01/09/2019 04:44:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01670502
Message ID:
01670506
Vues:
40
>Sir,
>
> I have used this command without textmerg
>
>			IF sqlexec(m.con1,'backup database &db1 to disk='&flname\&db1..bak'')<0
>				Aerror(laerror)
>				Messagebox(laerror[1,2])
>				Return.F.
>			Endif
>
>
>
>it says:
>
>Program Error
>Cancel
>Suspend
>Ignore
>Help
>Command contains unrecognized phrase/keyword.

Tariq, you're trying to insert a ' delimited string inside a ' delimited string. You must use a different outside delimiter.
IF sqlexec(m.con1,"backup database &db1 to disk='&flname\&db1..bak'")<0
(note " instead of ').

Also you may consider using a concatenated string instead of macros. Macros are to be used parsimoniously.
----------------------------------
António Tavares Lopes
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform