Click here to Skip to main content
15,894,314 members
Please Sign up or sign in to vote.
3.40/5 (3 votes)
See more:
hi friends.

i have developed a software with C# and sql server 2008.
my connection string is--
C#
@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ReminderDatabase.mdf;Integrated Security=true;User Instance=True;

and my database files are in the program execution path and i installed sqlexpress in that computer. i turned off the firewall and users have full access to the db files. now when i want to user log into the software(with pressing login button) an error occurs that say database can not be opened because it is version 661. this server supports version 655 and earlier. a downgrade path is not supported.could not open new database C:\program files\...\comp\...\mydatabase.mdf. create database is aborted. an attempt to attach an auto named database for C:\mypath\mydatabase.mdf failed. a database with the same name exists, or specified file can not be opened, or it is located on UNC share.

how can i solve this problem.

thanks friends.
Posted
Updated 21-Aug-14 0:11am
v2

thanks for answer.my database and my program both are in one computer.i do not use network
 
Share this answer
 
Comments
Herman<T>.Instance 21-Aug-14 6:49am    
You can reach our db via the SQL Server Management Studio?
_Starbug_ 21-Aug-14 6:51am    
i can not understand what you are saying.reach?
Herman<T>.Instance 21-Aug-14 6:58am    
you can open your database in SQL Server Management Studio?
_Starbug_ 21-Aug-14 7:01am    
yes i can.
Herman<T>.Instance 21-Aug-14 7:02am    
what is the name of the database?
You are mixing up the use of LocalDB ans SqlServer2008.

First: .\SQLExpress refers to a local instance and not a server instance. Replacing the . with the IP address of the SQL server is a starter.
Second: Use Catalog in stead of AttachDBFileName. With AttachDBFileName you can register your db. With Catalog you use the db.

Error with Located on a Share seems to look like you are using LocalDB and not SQLExpress. So find out which db you use, where it is in the network (LocalDB does not work over a network) -> IPADDRESS and which Catalog (= DB Name) your are using.
Is remote connection to the Db setup in the Sql Server Settings?

Enough to look after first.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900