tags:

views:

103

answers:

2

i made sdf file (sqlCE) from xml file.

when the file is ready, i want to attach him to mail.

but, when i try to attach i get error:

"The process cannot access the file......because it is being used by another process"

how i can fix it ?

tank's in advance

+1  A: 

I'm guessing that because SQLCE databases are run in-proc with your program that you can't get exclusive access to the file while your program is running.

Jason Punyon
Either that or the db engine has a lock on it.
SnOrfus
+2  A: 

Do you have an SqlCeConnection open on the file? Is it open in Visual Studio?

I suggest you use Process Explorer so you can identify the process which has a handle on it.

Philip Wallace
coooooooooooooooooooooooooool !!!!!!!!!
Gold
Did you figure it out?
Philip Wallace