I have Visual C++ Express edition and SQL Express edition installed. When I try to add a datasource, the only two choices are Microsoft Access and SQL Server File. This SQL one does not work when I select it with an error that it was "Unable to open the physical file x.mdf. Operating system error 32: 32(The process cannot access the file because it is being used by another process.). An attempt to attach an auto-named database.... When I do my own
System::Data::SqlClient::SqlConnection ^ c0;
System::Data::SqlClient::SqlCommand ^ k0;
System::Data::SqlClient::SqlDataReader ^ r0;
things work fine. Do I need to get a $ edition, download something extra, connect to the a different file (master.mdf and not x.mdf), repair/reinstall, ...?
I would note that it destroyed my msde mdf in previous attempts before I decided to try only the sql express server as a datasource.
I haven't really used VC++ express, but I'll have a go at solving the problem. You shouldn't need to buy the $ edition of SQL Server, or download something extra. In the past when I've seen this error, it has either been to do with file permissions or another instance being attached to the file. Verify that the user you're currently logged on as has full permissions on the file you are trying to connect to.
If this doesn't help, maybe post the connection strings you are using up.
|||For some reason I am not quite sure, when I tried to set up a datasource today after a reboot and not opening and debugging a project that had a manually written connection that worked, I was successful in getting the gui wizard to work.
Thanks.
No comments:
Post a Comment