MSPOS Concurrent MSDE Access

I have MSPOS installed on an XP POS computer and I am trying to develop a support module that would access the POS database directly while MSPOS is running concurrently. The db is therefore installed in an MSDE .mdf file.

I can't seem to get Visual Studio or any other application to connect concurrently with the MSDE .mdf file while MSPOS is running. If I connect first with Visual Studio I then get the following errors in MSPOS:

Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\MSPOS.mdf". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".

Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\MSPOS_log.LDF". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".

Cannot open database "MSPOS" requested by the login. The login failed. Login failed for user 'DELTA\R#_CMAR1'.

File activation failure. The physical file name "C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\MSPOS_log.LDF" may be incorrect.

Sometimes I only get just the third error, but in any case I can't seem to get concurrent access. Any ideas?

Thanks in advance.

Reply to
NetKnight
Loading thread data ...

How exactly are you trying to access the database?

If it is a standard MSDE database you can access via ODBC

Reply to
Michael

I have not been able to connect via ODBC and Windows Authentication, I get the following error: Connection failed: SQLState: '01000' [Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen(Connect()) Connection failed: SQLState: '08001' SQL Server Error: 17 [Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not exist of access denied.

The only way I have been able to connect to the POS database in Visual Studio 2008 is using the data source of "Microsoft SQL Server Database File", Selecting the MSPOS.mdf file in the Database file name and changing Data Source from SQLEXPRESS to MSPOSINSTANCE.

But as I menti> How exactly are you trying to access the database?

Reply to
NetKnight

Hi,

Were you able to f> I have MSPOS installed on an XP POS computer and I am trying to develop a

Reply to
Intellex

Yes, I did find the solution. The problem is in how you connect to MSDE. You can't use the "Microsoft SQL Server Database File" as the data source. If you do you end up locking the entire file exclusively and nothing else can connect.

You have to use "Microsoft SQL Server" as the Data Source and then be sure to choose the ".NET Framework Data Provider for SQL Server" under Data Providers.

The key is to enter the right Server Name > Hi,

Reply to
NetKnight

Files\Microsoft

Reply to
Intellex

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.