views:

12

answers:

1

Hi all, I am implementing a database on wince platform in EDB. I have created and successfully tested all database operations in MFC simple dummy database application. But when I have integrated database API into my project it create problem.

Scenario:

I am able to create database using CeMountDBVol(...) API with EDB flag on.

A table is created into the mounted volume (volume is a database in EDB world) by CeCreateDatabaseWithProps(...) API.

API CeOpenDatabaseInSession(...) opens the database successfully.

I need to call open database call two times from different functions. 1st time after creation of database and 2nd time before writing to database.

Now when I am call API CeWriteRecordProps(...) to write record to database it return with any error code 32 which means "The process cannot access the file because it is being used by another process.".

Here I am not getting which process it is trying to access. Your help will be appreciated.

This is my first questing, please forgive me if question forming is wrong.

A: 

Sorted out the problem :)

It was failing because of twice the calls for open database. EDB does not give close database call. My code is trying to open the table(EDB calls it as database) which is already opened. I removed the 2nd open database call and it returns success.

Thank you.

user001