Click here to Skip to main content
15,909,652 members
Home / Discussions / Database
   

Database

 
AnswerRe: Visio - Reverse Engineering > Code Generation Pin
Steve Maier28-Mar-06 8:37
professionalSteve Maier28-Mar-06 8:37 
GeneralRe: Visio - Reverse Engineering > Code Generation Pin
devvvy28-Mar-06 12:25
devvvy28-Mar-06 12:25 
GeneralRe: Visio - Reverse Engineering > Code Generation Pin
Steve Maier28-Mar-06 15:42
professionalSteve Maier28-Mar-06 15:42 
GeneralRe: Visio - Reverse Engineering > Code Generation Pin
devvvy29-Mar-06 4:37
devvvy29-Mar-06 4:37 
QuestionCan i use view Pin
papa198027-Mar-06 22:57
papa198027-Mar-06 22:57 
QuestionCreating a new user in SQL Server 2005 Pin
Brendan Vogt27-Mar-06 22:33
Brendan Vogt27-Mar-06 22:33 
Questiondaab transaction Pin
silverP27-Mar-06 22:08
silverP27-Mar-06 22:08 
QuestionHow to restore Backup file from remote PC to SQL Server? Pin
Sachin Gedam27-Mar-06 17:35
Sachin Gedam27-Mar-06 17:35 
Hello Friedns,

I am tring to restore backup file which is on Machine1. And SQL server might be on anyother machine in local network.

I am using this Code:
==============================================================
//create an instance of a server class
SQLDMO._SQLServer srv = new SQLDMO.SQLServerClass();
//connect to the server

if(rbLocal.Checked==true)
srv.Connect(this.txtServName.Text,this.txtUserName.Text,this.txtPass.Text);
else
srv.Connect(this.cmbServList.Text,this.txtUserName.Text,this.txtPass.Text);

//create a restore class instance
SQLDMO.Restore res = new SQLDMO.RestoreClass();
//set the backup device = files property ( easy way )
res.Devices = res.Files;
//set the files property to the File Name text box
res.Files = "[" + System.IO.Path.GetTempPath()+"AlcoMateBlank.BAK" + "]";
//set the database to the chosen database
res.Database = this.txtDBName.Text;

// Restore the database
res.ReplaceDatabase = true;
res.SQLRestore(srv);
==============================================================
This code working properly if Backup file is on Local Machine but not if backup file is on another machine in a network. I am getting this error

BackupDiskFile::OpenMedia: Backup device 'C:\DOCUME~1\sachin\LOCALS~1\Temp\AlcoMateBlank.BAK' failed to open. Operating system error = 3(The system cannot find the path specified.).

Can you please suggest me eassy way of restoring database from remote PC to remote sql server which is in LAN?

Sachin Gedam
(Software Engg.)
Pune India
Questionquery send between .net and ms access Pin
agentmikie27-Mar-06 13:03
agentmikie27-Mar-06 13:03 
QuestionHow to get Windows NT Logged User Name using Query Analyzer ****** URGENT Pin
GV Ramana27-Mar-06 8:51
GV Ramana27-Mar-06 8:51 
AnswerRe: How to get Windows NT Logged User Name using Query Analyzer ****** URGENT Pin
Eric Dahlvang29-Mar-06 8:50
Eric Dahlvang29-Mar-06 8:50 
Questionline1 : Incorrect syntax near ','. Pin
Amit R27-Mar-06 5:38
Amit R27-Mar-06 5:38 
AnswerRe: line1 : Incorrect syntax near ','. Pin
rccnh27-Mar-06 9:30
rccnh27-Mar-06 9:30 
AnswerRe: line1 : Incorrect syntax near ','. Pin
rccnh27-Mar-06 9:33
rccnh27-Mar-06 9:33 
GeneralRe: line1 : Incorrect syntax near ','. Pin
Amit R27-Mar-06 14:11
Amit R27-Mar-06 14:11 
AnswerRe: line1 : Incorrect syntax near ','. Pin
Rob Graham27-Mar-06 16:01
Rob Graham27-Mar-06 16:01 
AnswerRe: line1 : Incorrect syntax near ','. Pin
Amit R29-Mar-06 3:37
Amit R29-Mar-06 3:37 
QuestionT-SQL Help Pin
WDI27-Mar-06 2:51
WDI27-Mar-06 2:51 
AnswerRe: T-SQL Help Pin
Michael Potter27-Mar-06 2:58
Michael Potter27-Mar-06 2:58 
QuestionInvalid cast in using SQLDataReader Pin
Brendan Vogt27-Mar-06 2:35
Brendan Vogt27-Mar-06 2:35 
QuestionSQL login problem Pin
acroitoriu26-Mar-06 23:37
acroitoriu26-Mar-06 23:37 
AnswerRe: SQL login problem Pin
Brendan Vogt27-Mar-06 2:20
Brendan Vogt27-Mar-06 2:20 
QuestionCrystal Report, cannot find keycodev2.dll Pin
illusionFinder26-Mar-06 19:29
illusionFinder26-Mar-06 19:29 
AnswerRe: Crystal Report, cannot find keycodev2.dll Pin
nguyenvhn26-Mar-06 20:32
nguyenvhn26-Mar-06 20:32 
GeneralRe: Crystal Report, cannot find keycodev2.dll Pin
illusionFinder26-Mar-06 23:57
illusionFinder26-Mar-06 23:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.