I use the following command to backup sql database, it shows error "operation system error 5(access is denied)" when i backup to desktop or root directory otherwise it works well, How to backup my database to desktop? I am using VB.Net 2010, SQL Server 2008.
pDB.subDBExecQuery("BACKUP DATABASE " & pstrDbName & " to DISK = '" & strPath & "' WITH NOFORMAT, NOINIT, NAME = '" & pstrDbName & "', SKIP, STATS = 10", 500)