Stuck between "used by another" and "LoginError" | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Stuck between "used by another" and "LoginError"

How to input and output simultaneously in SQL 2005 Express? I want to process data of an old VS6 project in VisualStudio2005. First part is done. With SQL Management Studio I created the database file ‘dbTest4’ and attached it to SQL 2005 Express server (.SQLEXPRESS). Then I recoded the VS6_C++ project feeding its data into the database file using the ConnectionString:
"Provider=’sqloledb’;Data Source=’.’;Initial Catalog=’dbTest4′;Integrated Security=’SSPI’)" Until here its working fine.
As second part I want to catch these data with VisualStudio2005 for processing there. In VisualStudio 2005 I created a Windows Application as new project added the database file ‘dbTest4’ as data source, waited two minutes till VisualStudio2005 had created the DataGridTools bound to the tabbles of my database file and dropped a grid tool on to the surface of the new Form. Great, within 5 minutes I had created a working database solution without writing a single line of code and it worked well. Starting the new build exe as standlolone it showed the data of my database file in a nice grid view. But it worked as standolone only. When I tried to combine both parts one part was blocked always producing error messages as ‘ ..error 32 (The process cannot access the file because it is being used by another process.) while attempting to open the file ‘…dbTest4’. Does anybody know
how to get this input/output combination running
or is ist impossible to reach my target with SQL 2005 Express and I have to buy the full product or switch to MySQL?

[<img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ />] The problem occurs with Express version of SQL 2005 only and a solution is: <b>User Instance=False</b><br /><br />After reading through Roger Wolters November 2005 article <br /><b>SQL Server 2005 Express Edition User Instances</b> <br />(<a href=’’ target=’_blank’ title=’'<a target="_blank" href=></a></a>)<br />and some hours of testing I came to the conclusion:<br /><br />When using SQL Express with Visual Studio not exclusively but simultaneously with other clients as SQLcmd, SQL Managent Studio or what else, as shown in my screenshot 325 (<a href=’’ target=’_blank’ title=’'<a target="_blank" href=></a></a>) you should consider to<br /><b>set ‘User Instance=False'</b><br />if you are struck by connection problems.<br /><br />For details you are welcome to visit my sreenshot folder (<a href=’’ target=’_blank’ title=’'<a target="_blank" href=></a></a>). By clicking the numbered screenshots, enlarging them and using your browsers back button you can follow a detailed installation and see why, where and how to set ‘User Instance=False’.<br /><br />Martin