>Sir I have these codes for sqlserver backup
>
>
>flname='at17'
>mdest2=[D:\Backup/]
>nresult=SQLEXEC(m.con,"backup database &flname to disk='&mdest2\&flname..bak'")
>IF nresult<0
> aerror(laerror)
> messagebox(laerror[1,2])
> return(0)
>ELSE
> MESSAGEBOX("Done")
>ENDI
>
>
>The codes work fine in Development mode but when I run codes in EXE then it shows this error message
>
>
Connectivity error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot perform a backup or restore operation within a transaction.>
>I tested codes on SERVER before any transaction,
>
>What I am doing wrong?
Just a guess -- what if you add the following just before the SQLEXEC() ?
= SQLSETPROP(m.con,"Transactions",DB_TRANSMANUAL)
(this assumes you've got a #INCLUDE FOXPRO.H to make sure the DB_TRANSMANUAL constant is defined -- otherwise you could replace it with the value 2)