I am having a issue restoring my database through my vb.net program here is the code I am using
Dim res As Restore = New Restore()
res.Devices.AddDevice(backupLoc + databaseName + ".bak", DeviceType.File)
res.Database = realDBName
res.ReplaceDatabase = True
res.PercentCompleteNotification = 1
AddHandler res.PercentComplete, AddressOf ProgressEventHandler
The error its spitting out is
directory look up for the file .....MSSQL\Data\dbtest.mdf" failed with the oporating system error 3(The system could not find the path specified)
But if i go do a manual backup through sql managment tool it works fine.
Any ideas why it would be looking for the mdf.