.LDB File not being deleted after oledbconnection.close being call

G

Guest

I have seen a thread similar to this problem earlier in this thread
unfortuantely did not really see a solution. My problem is as follows.
I am opening a connection to an access database performing some operations
and the closing (typical use) I notice however that upon calling the
oledbconnection.close method the .ldb file that is created is not deleted. I
am also unable to delete this file myself until I exit the program. I have
tried setting the connection object to nothing and disposing it after the
connection is closed as well as callin gc.collect, all to no avail. I have
connection pooling disabled within the connection string. I am stumped and
would greatly appreciate any help anyone can give me. FYI I am using .net
framework 2.0 and visual basic 2005. PLEASE HELP!
 
P

Paul Clement

¤ I have seen a thread similar to this problem earlier in this thread
¤ unfortuantely did not really see a solution. My problem is as follows.
¤ I am opening a connection to an access database performing some operations
¤ and the closing (typical use) I notice however that upon calling the
¤ oledbconnection.close method the .ldb file that is created is not deleted. I
¤ am also unable to delete this file myself until I exit the program. I have
¤ tried setting the connection object to nothing and disposing it after the
¤ connection is closed as well as callin gc.collect, all to no avail. I have
¤ connection pooling disabled within the connection string. I am stumped and
¤ would greatly appreciate any help anyone can give me. FYI I am using .net
¤ framework 2.0 and visual basic 2005. PLEASE HELP!

Could you post an example of your code?


Paul
~~~~
Microsoft MVP (Visual Basic)
 
G

Guest

Well I have actually gone a different direction with it now but would still
like to find a solution as I have other places it would be useful. the code
is basically as follows ( sorry no details allowed)

dim x as oledbconnection
dim y as oledbCommand

' I AM GOING TO PARAPHRASE THE CONNECTION STRING

x = new oledbconnection("Provider =Jet 4; data source=mydb;system database=
my system;userid=me;password=pw;ole db services=-4;persist security info =
false;

'TABLE IS ALREADY FILLED DataTable

x.open
for each row as dataRow in Table.Rows
'generate insert statement here
'execute insert statement here
end for

x.close

That's the code in a nutshell. Thanks for the help.
 
P

Paul Clement

¤ Well I have actually gone a different direction with it now but would still
¤ like to find a solution as I have other places it would be useful. the code
¤ is basically as follows ( sorry no details allowed)
¤
¤ dim x as oledbconnection
¤ dim y as oledbCommand
¤
¤ ' I AM GOING TO PARAPHRASE THE CONNECTION STRING
¤
¤ x = new oledbconnection("Provider =Jet 4; data source=mydb;system database=
¤ my system;userid=me;password=pw;ole db services=-4;persist security info =
¤ false;
¤
¤ 'TABLE IS ALREADY FILLED DataTable
¤
¤ x.open
¤ for each row as dataRow in Table.Rows
¤ 'generate insert statement here
¤ 'execute insert statement here
¤ end for
¤
¤ x.close
¤

Well I don't see anything obvious unless you have another connection somewhere to the database. You
could take a peek at the .LDB file to see if it gives you any clues.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;176670


Paul
~~~~
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top