Hello,
I have a database on my system with same name as that on the remote server.I do have DSN Name, userid & password for connecting the remote server.
Is there any possibility of restoring the database backup taken from the local system to the remote server database using Visual basic.
I tried to get connected using the following string
Set con = New ADODB.Connection
con.ConnectionString = "Provider=SQLOLEDB;server=SYSTEM1;" & _
"Initial Catalog=testing1;User Id=sa;Password=;"
con.Open
I used the following syntax to restote the database from my local system disk F to restore the database by name testing1 located on the remote server.
sql = "USE master RESTORE DATABASE arnavtranslines FROM DISK = '\\system1\f\testing1.bak'"
Even though the statement is getting executed, the database on the remote machine is not getting updated.
Can any one guide me.
|