Trouble Attaching MDF file From Client
Posted on 2002-06-05
I have a utility written in Delphi which uses Sql Dmo to talk to Sql Server. I have a local installation of Sql Server and there is also a Server installation.
The utility prompts the user for a Database Name and file location (for the mdf). If the location doesn't exist it creates it. Then it copies an empty version of our application's MDF file to the location and attempts to attach it to Sql Server using the following syntax:
edtSqlDBName.Text does contain the Name of the database and sFileLocNew does contain a full path to the mdf file.
When running against my local copy of Sql Server everything works just fine. The file is copied and then attached using the new name.
But when trying the same thing against the server I am able to create the new folder and copy the mdf file, but I get the following error when attempting to attach:
File '\\Labserver\C\Program Files\Kewill\JobBOSS\Databases\TrainSql\TrainSql_data.mdf' is on a network device not supported for database files.
What has gone wrong? I know I can talk to the server version as I have done other things (including detaching, copying and then reattaching databases) with it.