Hi Tariq,
you can google how to do each of these steps.
1) In ssms, run your backup to a drive on the server, using the Script To to capture the script.
2) Use the script to install a Stored Procedure on the SQL Server.
3) From VFP, create a PRG to call the Stored Procedure, and then move the file from the directory on the server to the local machine.
The other alternative is to create an iSCSI drive on the SQL Server that points to a folder on the local machine. The iSCSI drive will appear to be a local drive to SQL.Doing so is much more work, and is much less flexible, than the steps above.
hth,
Hank
>Dear Experts
>
>I am using SQLSERVER 2008 R2.
>
>Want to send backup from server to client
>For this I am trying this code
>
>
>filename='accounts'
>mdest2='\\Sales\d'
>target1=ALLTRIM(mdest2)+ALLTRIM("\")+ALLTRIM(filename)+ALLTRIM(".bak")
>
>MESSAGEBOX("Backup path is"+CHR(13)+target1,0+64,"SQLSERVER")
>nresult=SQLEXEC(m.con,"backup database &filename to disk='target1'")
>
>IF nresult<0
> MESSAGEBOX('Backup Faild-1',0+64,'Backup')
> RETURN
>ELSE
> MESSAGEBOX("Done")
>ENDI
>
>
>
>but it says:
>Backup Faild-1
>
>Please help