Visual C# Express Edition Beta 2 and SQL Server Express Beta 2
I tried to connect the SQL server express from C# Express beta 2 and got some error.
In the "Add Connection" Dialog the options I gave are:
Data source: SQL server Database
Database file name: C:\Program Files\Microsoft Sql Server\MSSQL.1\MSSQL\Data\tempdb.mdfIs it right? else What to give here?
Used Windows Authentication
and Data Source .\SQLEXPRESS. Got the Error Message as:
Unable to open the physical file "C:\....tempdb.mdf".Operating System error 32:"The Process cannot access the file because it is being used by another process".
Thanks,
Maria
Hi,
Looks like what your using as a DataSource is
Microsoft SQL Server Database File (SqlClient). Try changing it to
Microsoft SQL Server (SqlClient), fill up the server name with .\SQLEXPRESS and fill up the necessary info...
cheers,
Paul June A. Domag
Paul,
I recently installed Visual C# 2005 Express Edition. I was originally looking for Microsoft SQL Server (SqlClient) as an opting however it is not. With the SQLServer Database File I get the same error as described earlier in this post.
Any help or suggestions on how I can get past this error would be appreciated.
Kent
the only way i could attach in VC# is to detach the database in SQL Management studio express first. (Object explorer-->Databases) then right click, then select detach.
What pisses me off is that microsoft knows that this is a problem when using SQL Server Express with VC#, do a google search and see how many times that error comes up. Yet they don't post a clear, unambiguous solution to the problem in their knowledgebase as it relates to VC#. If their is one, they have hidden it very well. Now, they will gladly take $250 for a phome call, or $99 for an email, for a problem that they exists, yet will not tell you-free of charge-how to fix it!!
Hi vikram:
i follow your suggestion ,but it still can't connect to sql server express,everytime,it gives a error with different message.i don't know what todo ? if you have the solution,please tell me!thank you first,and have a good time!