Solved

Bookmark Error

Posted on 1998-12-02
8
363 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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
 
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

856 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