>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