473,320 Members | 1,845 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Finding pointers to recordsets inadvertently left open...

Hi

Is there any way to walk thru memory to find a variable that holds a
reference to a recordset that has been left open? (I use ADO for my
recordsets.)

The reason I want this info:

I am writing code to compact back end files.

If all recordsets, bound forms, combo boxes, etc are closed, the lock
file for each back end db should be automatically deleted (is this
correct?). If so, I can compact the back end databases from the front
end using the compactdatabase method.

However, I close all my forms, but still one of the lock file lingers
on.

The only reasonable hypothesis, seems to me, is that a recordset has
inadvertently been left open. Is this so? And how to discover the
rogue variable and correct the code that left it open... or do I have
to plod my way thru all my ugly code?

At present I have to do the compact and repair in the startup
procedure of the app, which will add to startup times, so not ideal.

Regards

Andrew Wrigley
Nov 12 '05 #1
2 1608
if you have links to the tables in the BE....there is your lock.
try to compact from an external application
Nov 12 '05 #2
Thanks the good intentions, but sorry, you are wrong.

The links to the BE will only cause an .ldb file to be opened IF there
are bound forms currently open that use the linked tables.

My problem is that the links are left open EVEN after closing all
bound forms.

In fact, I have solved the problem by plodding thru the code. For
reasons that escape me, a sub that I used to modify the sql of a query
using adox was causing the problem.

I changed the code to use ado, and all is now as expected. However,
in the UK Access User Group someone said that they had the reverse
problem, ie, when they changed from dao to adox the problem went away.

Ah, well, if this job was easy I would be paid less.

Thanks all the same.

Andrew Wrigley
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Steve Marciniak | last post by:
I'm trying to display different recordsets (which are 1 field each) as columns right next to one another. For example, Recordset1 is displayed on the left hand side of the screen. Recordset2 is...
1
by: Sascha | last post by:
Hi I need some help on achieving the following: I wrote a querie which collects Data out of three Tables, the Result looks like this: SET NOCOUNT ON DECLARE @ROW INT
4
by: Stuart | last post by:
Hi there, I am trying to populate the array "yourImages" in the following code, http://www.javascriptkit.com/script/script2/preloadimage2.shtml except i am trying to fill it with the values from...
1
by: Sean O | last post by:
Is there a way to browse in the VB editor or run some code to help me find any unwanted opend recordsets or open variables? Thanks, Tony
138
by: ambika | last post by:
Hello, Am not very good with pointers in C,but I have a small doubt about the way these pointers work.. We all know that in an array say x,x is gonna point to the first element in that...
23
by: Steffen Fiksdal | last post by:
I have programmed a library which offers an API which takes both 'const char*' and 'char**' pointers as input parameters. An example: extern int apicall( int sessioncontext, const...
16
by: Randy Harris | last post by:
I was inspired by the recent discussion of returning multiple recordsets to ADO from a stored procedure. (Amazed is probably more accurate). I asked about how to accomplish same with Oracle and...
4
by: rdemyan via AccessMonster.com | last post by:
Can someone help me with creating code that will look for DAO recordsets in modules and then check to see if the recordset is also closed in the module. All of my recordsets are of the form rs*...
12
convexcube
by: convexcube | last post by:
Hi Experts, I have a unbound form which records details of complaints. It also records what products are affected in the complaint. These are stored in a table named ComplaintProducts that has...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.