Question

  Asked: Jun 30 2008   7:35 PM GMT
  Asked by: SQL Server Ask the Experts


Unable to Restore Backup in SQL Server 2005


SQL Server 2005, SQL Server 2000, SQL Server backup, VB.NET

I am unable to RESTORE Backup through code in SQL Server 2005 from VB.Net, even though that code is running fine in SQL Server 2000.

The code is:
"restore database [" + databasename + "] from disk ='" + Me.lblSource.Text + "' with move '" & dfile & "' to '" + Me.lbldatafile.Text + "'," & _ " move '" & lfile & "' to '" + Me.lblLogFile.Text + "'"

Do you have any ideas?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



It looks correct from here. Use SQL Profiler and see what it says as far as the actual command which is being run.

What's the error message which is being returned?
  • AddThis Social Bookmark Button

Browse more Questions and Answers on SQL Server and Development.

Looking for relevant SQL Server Whitepapers? Visit the SearchSQLServer.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register