Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Backup Problem
Message
From
06/09/2016 00:36:23
 
 
To
05/09/2016 12:24:31
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 7
Network:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01640479
Message ID:
01640512
Views:
76
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform