I am trying to restore a databse from .bak file (created from sql server 2008 r2 express edition) to sql server 2012 express edition. I right click on the new databse I have created on sql server2012 database. Click on Tasks -> Restore -> Database. On Restore Database window I select 'Device' radio button. Upon clicking 'Select backup devices' and Selecting 'aaa.bak' file from 'Locate backup file' window when I click on 'Add' I get the following exception. I tried searching on different blogs but couldn't find anything remotely close to something that would solve this problem or at least help me find out what the exception is about -
===================================
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Program Location:
at Microsoft.SqlServer.Management.Common.ServerConnection.GetExecuteReader(SqlCommand command)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteReader(String sqlCommand, SqlCommand& command)
at Microsoft.SqlServer.Management.SqlMgmt.BrowseFolderEx.IsPathExisting(String path, Nullable`1& isFolder)
at Microsoft.SqlServer.Management.SqlMgmt.BrowseFolderEx.HandleFileNamePaths(String filePath)
at Microsoft.SqlServer.Management.SqlMgmt.BrowseFolderEx.OnOK(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.RunDialog(Form form)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreSelectBackupSource.AddFile()
at Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreSelectBackupSource.buttonAdd_Click(Object sender, EventArgs e)
===================================
Incorrect syntax near 's'.
Unclosed quotation mark after the character string ''. (.Net SqlClient Data Provider)
------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.5058&EvtSrc=MSSQLServer&EvtID=102&LinkId=20476
------------------------------
Server Name: xxx
Error Number: 102
Severity: 15
State: 1
Line Number: 1
------------------------------
Program Location:
at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
at Microsoft.SqlServer.Management.Common.ServerConnection.GetExecuteReader(SqlCommand command)