Reputation: 55
I have created a project in Visual Studio using a Windows Form application C#.
However when I try to add a service-based database to the project the following message appears:
The file \\(file name has not been included for privacy reasons)\mydocuments\visual studio2010\Projects\Experiment\Experiment\Experiment.mdf is on a network path that is not supported for database files. CREATED DATABASE failed. Some file name listed could not be created. Check related errors. User does not have permission to alter database. ‘FF557489-6500-4C96-86DA-B07E7615056D’, or the database does not exist. ALTER DATABASE statement failed. User does not have permission to alter database ‘FF557489-6500-4C96-86DA-B07E7615056D’, or the database does not exist. ALTER DATABASE statement failed. The database ‘FF557489-6500-4C96-86DA-B07E7615056D’ does not exist. Supply a valid database name. To see available databases, use sys.databases.
(I would have included a picture of the error but Stackoverflow insists I have 10 reputation points before I am allowed to included images in a post).
Has anyone encountered this before and know a way around it?
Upvotes: 1
Views: 371
Reputation: 8511
As per MSDN, Permissions to Create or Deploy a Database -
Please refer - Permissions to Create or Deploy a Database on MSDN
Upvotes: 0
Reputation: 44288
critical part of your error message "is on a network path that is not supported for database files"
try making sure its on the local disk.
Upvotes: 1
Reputation: 121599
Recommendations:
1) Verify you can connect to your MSSQL database instance
2) Simply issue "create database MYDATABASE". Let MSSQL decide where to put the files (you'll have a database file and a corresponding database log file).
IMHO...
Upvotes: 0