Solved

Bookmark Error

Posted on 1998-12-02
8
359 Views
Last Modified: 2008-02-20
I have encountered error 3159 - Not a valid bookmark. The strange thing is that it occurred while executing the following statement. "Set db=CurrentDb"

I don't get it, where is the reference to a bookmark?
0
Comment
Question by:gbentley
  • 4
  • 4
8 Comments
 
LVL 12

Expert Comment

by:Trygve
ID: 1969972
First: Be sure that db has not been dimension as a bookmark. Yes, it sounds stupid, but we all do things like this and its "impossible" to see it by reading your own code.

If everything is correct, try this; While in design mode in a module, select Debug, Compile and Save All Modules. If you get any errors they should be able to guide you to the problem. If not enter Tools, References and see if any of the marked lines have the word missing in the description. If so, remember the file names,  deselect these items and then reenter them by browsing your way to them.

Still problems. Try compacting and repairing the database. Still problems. Make a new database and import all the object into it. Still problems; Reinstall Access/Office.
0
 
LVL 5

Author Comment

by:gbentley
ID: 1969973
OK, the code is not the problem. This is an error that occurred in a database that has been used for some time. Repairing did fix the problem.

My question is intended to find out what could of caused this to happen. There is an intermittent error in another place int this database and I am trying to track EXACTLY what is going on.

I am a programmer from the old school which says that reinstalling does not "solve" the problem because it doesn't explain why it happened and how to stop it in the future.

If no-one has a better answer, I will get you to re-post and give you the points.

Thanks
0
 
LVL 12

Expert Comment

by:Trygve
ID: 1969974
I think that this is one of those "problem with no reasonable reason" problems. I also like to know what happens all the time, but some problems will keep you searching for hours and hours and you end up finding nothing.

From time to time modules and other objects "get stuck" in the database. For example. Deleting a module and import the same module from another base may cause a message of duplicate occurences of procedures etc. I think the reason for this is that Access does not actually remove objects that is deleted. They keep stuck till the next compact/repair session. Most of the time this does not cause you any trouble except the fact that your database keep growing.
0
 
LVL 5

Author Comment

by:gbentley
ID: 1969975
Thanks for that. I'm having a lot of trouble with unreliable connections and queries. The process that Access goes through is:

Drop the SQL connection if it exists
Connect to a SQL table
Run a query on that table and some local tables
Drop the connection
Export some data to SQL
Call a SQL stored procedure
Then do it all again on another SQL database/table, and again, and again, and.......

Note that all the attached tables have the same name so it is drop GLChart, reconnect to a different GLChart, query it, etc.

What I need is to get this routine to the stage where it works EVERY time the user clicks the button. They have just moved from a legacy system and this is the expected reliability. I have enough trouble explaining WHY you have to restart SQL/NT Server to fix errors. That didn't happen on the old system! It doesn't help that I don't know WHY this is the case. It is surely possible to write an operating system that doesn't leak memory?

Any further suggestions as to how to trap this kind of thing or how to recover from the errors in a polite fashion would be greatly appreciated.

0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 12

Expert Comment

by:Trygve
ID: 1969976
Would it be possible for you to have all the tables attached, with different names ? This would prevent your application from leaking memory due to your creation/deletion of connections etc. As for your errors, you should be able to deal with almost any error by error trapping, but this will of course demand lots of checking to make bullet proof.
0
 
LVL 5

Author Comment

by:gbentley
ID: 1969977
It is virtually impossible to set up the connections as permanent. This is because the specific SQL database that it links to is dependant on user selections. The number of DBs can also grow with time.

I have found that there are SQL problems tied up with this error so I don't think it is purely an Access issue.

I would like to close this question and then create another worth 100 points to award Trygve.

Trygve, please answer the next question with this name.
0
 
LVL 5

Author Comment

by:gbentley
ID: 1969978
OK, I won't delete it.

Trygve, please answer and I will award the points to you.

0
 
LVL 12

Accepted Solution

by:
Trygve earned 50 total points
ID: 1969979
OK, you got it.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now