Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Database: MS Access
 Compacting error
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

TonyB7
Junior Member

USA
267 Posts

Posted - 09 July 2006 :  23:55:29  Show Profile  Send TonyB7 an AOL message  Send TonyB7 a Yahoo! Message
quote:
Microsoft JET Database Engine error '80004005'

You attempted to open a database that is already opened exclusively by user 'Admin' on machine 'SOLO'. Try again when the database is available.

/testforum1/admin_compactdb.asp, line 104
There's a topic about this from 2002, but no resolution was given. This db's about 50mb so it's getting to be a real pain to download and compact it.

Any help appreciated.

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 10 July 2006 :  03:08:01  Show Profile
What you need to do is make sure that you have none of the tables open when you try to compact it. You also should not do it, while it is online as you may end up with more issues than the size.

I would down the forum and ftp the DB down to your local machine (make a backup of the DB once down) and then run the compact tool from Access. Then upload the DB and bring the forum back up.

I hope that helps you.

Cheers,

David Greening
Go to Top of Page

TonyB7
Junior Member

USA
267 Posts

Posted - 10 July 2006 :  19:16:46  Show Profile  Send TonyB7 an AOL message  Send TonyB7 a Yahoo! Message
That's what I've been doing, but at 50mb it means the forum's gotta be down for quite a while. This late at night after everyone logs off, which is tough for me to do.

So, if the forum's been closed, why does it think the admin is still logged on? I mean, I'm still logged into _something_, but how can I run the compact if I'm not?
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 10 July 2006 :  19:41:00  Show Profile  Send ruirib a Yahoo! Message
Check whether there is a .ldb file in the same folder as the .mdb file. If there is, delete it, of course, once you have shut down the forum. Try to compact again once the deletion is done.

If there is no .ldb, then you may be in trouble... You could ask your host to make sure the DB default opening mode is set to Shared, but frankly speacking I have never had this happening to me, so I have no experience finding a solution for it.



Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

TonyB7
Junior Member

USA
267 Posts

Posted - 10 July 2006 :  22:28:54  Show Profile  Send TonyB7 an AOL message  Send TonyB7 a Yahoo! Message
Sorry, you mentioned to check that in the old topic and no, there's no .ldb file in there.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 11 July 2006 :  03:26:17  Show Profile  Visit HuwR's Homepage
if there is no ldb file then the db can not be open.
Go to Top of Page

TonyB7
Junior Member

USA
267 Posts

Posted - 11 July 2006 :  22:20:56  Show Profile  Send TonyB7 an AOL message  Send TonyB7 a Yahoo! Message
I guess the ldb file must be somewhere else, because the forum's working fine. It's a shared host, and it's not anywhere in my wwwroot/ folders.
Go to Top of Page

campinmom03
Junior Member

USA
190 Posts

Posted - 22 January 2008 :  16:24:53  Show Profile
Hello. I did a search so I hope I am in the right topic for this problem with my db. When I try to compact my access db, I get that it cannot create a folder. Therefore leaving me unable to compact my db. Has anyone had this problem? If so, how was it fixed?

Any help would be appreciated.

Have a great day!
Terry

Edited by - campinmom03 on 22 January 2008 16:25:30
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 22 January 2008 :  16:45:14  Show Profile  Send ruirib a Yahoo! Message
Ask your host to set the proper permissions.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

campinmom03
Junior Member

USA
190 Posts

Posted - 22 January 2008 :  18:02:16  Show Profile
Rui, permissions are set. I see now there is more to get to the bottom of this. The db had been compacted at one time, saved to a snitz_forums_db_somenumbers.bak file. If the compact was successful it saved it to the old snitz_forums_db.mdb. Does that sound right? If so, why would it tell me it cannot create a folder? Do you know what I have to do to correct this?

Many thanks.

Have a great day!
Terry
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 22 January 2008 :  18:36:59  Show Profile  Send ruirib a Yahoo! Message
Terry, to tell you the truth, I think that code never run too well. I remember I even wrote some code to compact the Access DB without the issues our regular code had.

Actually I've been working on code to compact an Access DB today. I can probably throw up some code for you to use directly (that is, not using the forum interface) if you want me to.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

campinmom03
Junior Member

USA
190 Posts

Posted - 22 January 2008 :  18:49:26  Show Profile
Rui, Do I have good timing or what? If it doesn't divert you from what you were doing sure, and if you can show me how to do that, that would be great.

Thank you

Have a great day!
Terry
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 22 January 2008 :  18:57:23  Show Profile  Send ruirib a Yahoo! Message
Does your connection string use Server.MapPath or a direct link to the .mdb file?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

campinmom03
Junior Member

USA
190 Posts

Posted - 22 January 2008 :  19:05:17  Show Profile
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/hosting/xxxxxxxxxxxx/xxxxxx/xxxxxxxx/xxxxxxxxxxxxxx/snitz_forums_db.mdb"

Terry

Have a great day!
Terry
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 22 January 2008 :  19:16:19  Show Profile  Send ruirib a Yahoo! Message
Ok, so this code will work. Copy it, paste it into a new file, save it in your forum folder by giving it a name of your choice (say compact.asp) and then just execute it.

<!--#include file="config.asp"-->
<!--#include file="inc_func_common.asp"-->

<%

if Session(strCookieURL & "Approval") <> "15916941253" then
	scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
	Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
end if

Set regB = new RegExp
regB.Pattern="(\w|\W):.+mdb$"

Set mtch = regb.Execute(strConnString)

If mtch.Count <> 1 Then
	Set regB = Nothing
	Set mtch = Nothing
	Response.Write "Cannot find the database to compact.<br/>"
	Response.End
Else
    sourceFile = mtch.Item(0)
    Set regB = Nothing
	Set mtch = Nothing
End If

Set fs = Server.CreateObject("Scripting.FileSystemObject")

strExtension = DateToStr(Now())

destFile = sourceFile & "." & strExtension & ".tmp"

Set jro = Server.CreateObject("JRO.JetEngine")

dbConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data source="

jro.CompactDatabase dbConn & sourceFile, dbconn & destFile

fs.DeleteFile sourceFile

fs.MoveFile destFile, SourceFile

Set fs = Nothing
Set jro = Nothing

Response.Write "Database " & sourcefile & " compacted successfully.<br/>"

%>


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

campinmom03
Junior Member

USA
190 Posts

Posted - 22 January 2008 :  20:00:31  Show Profile
Rui, Thank you! One question, when I execute it, shouldn't I shut the forum down?

Have a great day!
Terry
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.14 seconds. Powered By: Snitz Forums 2000 Version 3.4.07