Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / ADO.NET / January 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris McNear - 12 Jan 2006 14:47 GMT
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!
Paul Clement - 12 Jan 2006 20:18 GMT
¤ 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)
Chris McNear - 12 Jan 2006 23:00 GMT
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.

> ¤ 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.
[quoted text clipped - 13 lines]
> ~~~~
> Microsoft MVP (Visual Basic)
Paul Clement - 13 Jan 2006 14:21 GMT
¤ 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)

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.