Connecting Tech Pros Worldwide Forums | Help | Site Map

A2k bug? Deleting db.props causes corrupt db

Arno R
Guest
 
Posts: n/a
#1: Nov 12 '05
Hi all
In another thread I had problems changing db.props
Another problem I encountered while testing this: db corrupt
When I deleted db.props through code in a loop I could not start the db again ... @#$%$

Warning: Don't just try following code on any existing db. Make sure there is a copy! (I did ...)

To test I created a NEW db in A2000 and just set some properties (menu StartUpOptions)
Props like: AppTitle, StartUpForm, StartUpShowDBWindow, StartUpShowStatusBar
AllowShortcutMenus, AllowFullMenus, AllowBuiltInToolbars, AllowToolbarChanges, AllowSpecialKeys

When you run the following code and close the db, you can't get in again.
Also compact and repair doesn't work.

(Just tested: Also even without changing or creating any props the code kills the db!)

Sub TestProps()
Dim i As Integer
On Error Resume Next 'You can't delete build-in props
For i = 0 To CurrentDb.Properties.Count - 1
Debug.Print CurrentDb.Properties(i).Name 'just to see what happpens
CurrentDb.Properties.Delete CurrentDb.Properties(i).Name
Next i
End Sub

After running this code and opening the db again:
Access 'complained' that the db was converted from a previous version by using DAO method
CompactDatabase etc.
(Message in Dutch, translation maybe not 100% )

I know I have to treat Access 'gently' but sometimes I really #$#%$$^$^%&*
Any comments? Anything wrong with the code?

TIA
Arno R




Lyle Fairfield
Guest
 
Posts: n/a
#2: Nov 12 '05

re: A2k bug? Deleting db.props causes corrupt db


"Arno R" <arracomn_o_s_p_a_m@tiscali.nl> wrote in
news:3fa3b948$0$79336$5fc3050@dreader2.news.tiscal i.nl:
[color=blue]
> Hi all
> In another thread I had problems changing db.props
> Another problem I encountered while testing this: db corrupt
> When I deleted db.props through code in a loop I could not start the db
> again ... @#$%$
>
> Warning: Don't just try following code on any existing db. Make sure
> there is a copy! (I did ...)
>
> To test I created a NEW db in A2000 and just set some properties (menu
> StartUpOptions) Props like: AppTitle, StartUpForm, StartUpShowDBWindow,
> StartUpShowStatusBar AllowShortcutMenus, AllowFullMenus,
> AllowBuiltInToolbars, AllowToolbarChanges, AllowSpecialKeys
>
> When you run the following code and close the db, you can't get in
> again. Also compact and repair doesn't work.
>
> (Just tested: Also even without changing or creating any props the code
> kills the db!)
>
> Sub TestProps()
> Dim i As Integer
> On Error Resume Next 'You can't delete build-in props
> For i = 0 To CurrentDb.Properties.Count - 1
> Debug.Print CurrentDb.Properties(i).Name 'just to see what
> happpens CurrentDb.Properties.Delete CurrentDb.Properties(i).Name
> Next i
> End Sub
>
> After running this code and opening the db again:
> Access 'complained' that the db was converted from a previous version by
> using DAO method CompactDatabase etc.
> (Message in Dutch, translation maybe not 100% )
>
> I know I have to treat Access 'gently' but sometimes I really
> #$#%$$^$^%&* Any comments? Anything wrong with the code?
>
> TIA
> Arno R[/color]

I ran an acetylene torch over my hard drive for less than 10 minutes and
my database was corrupted too. Ain't Microsoft BAD!? Huh?

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Michael \(michka\) Kaplan [MS]
Guest
 
Posts: n/a
#3: Nov 12 '05

re: A2k bug? Deleting db.props causes corrupt db


Yes, Lyle is right -- this is NOT a bug, and it is frightening that anyone
would think it is.

If your db was a abody, this would be like chopping off all of the fingers
and toes. What kind of shape would that person be in?


--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies

This posting is provided "AS IS" with
no warranties, and confers no rights.




"Lyle Fairfield" <MissingAddress@Invalid.Com> wrote in message
news:Xns9426642495BA8FFDBA@130.133.1.4...[color=blue]
> "Arno R" <arracomn_o_s_p_a_m@tiscali.nl> wrote in
> news:3fa3b948$0$79336$5fc3050@dreader2.news.tiscal i.nl:
>[color=green]
> > Hi all
> > In another thread I had problems changing db.props
> > Another problem I encountered while testing this: db corrupt
> > When I deleted db.props through code in a loop I could not start the db
> > again ... @#$%$
> >
> > Warning: Don't just try following code on any existing db. Make sure
> > there is a copy! (I did ...)
> >
> > To test I created a NEW db in A2000 and just set some properties (menu
> > StartUpOptions) Props like: AppTitle, StartUpForm, StartUpShowDBWindow,
> > StartUpShowStatusBar AllowShortcutMenus, AllowFullMenus,
> > AllowBuiltInToolbars, AllowToolbarChanges, AllowSpecialKeys
> >
> > When you run the following code and close the db, you can't get in
> > again. Also compact and repair doesn't work.
> >
> > (Just tested: Also even without changing or creating any props the code
> > kills the db!)
> >
> > Sub TestProps()
> > Dim i As Integer
> > On Error Resume Next 'You can't delete build-in props
> > For i = 0 To CurrentDb.Properties.Count - 1
> > Debug.Print CurrentDb.Properties(i).Name 'just to see what
> > happpens CurrentDb.Properties.Delete CurrentDb.Properties(i).Name
> > Next i
> > End Sub
> >
> > After running this code and opening the db again:
> > Access 'complained' that the db was converted from a previous version by
> > using DAO method CompactDatabase etc.
> > (Message in Dutch, translation maybe not 100% )
> >
> > I know I have to treat Access 'gently' but sometimes I really
> > #$#%$$^$^%&* Any comments? Anything wrong with the code?
> >
> > TIA
> > Arno R[/color]
>
> I ran an acetylene torch over my hard drive for less than 10 minutes and
> my database was corrupted too. Ain't Microsoft BAD!? Huh?
>
> --
> Lyle
> (for e-mail refer to http://ffdba.com/contacts.htm)[/color]


R. Soul
Guest
 
Posts: n/a
#4: Nov 12 '05

re: A2k bug? Deleting db.props causes corrupt db



"Michael (michka) Kaplan [MS]" <michkap@online.microsoft.com> wrote in
message news:3fa3cd13$1@news.microsoft.com...[color=blue]
> Yes, Lyle is right -- this is NOT a bug, and it is frightening that anyone
> would think it is.
>
> If your db was a abody, this would be like chopping off all of the fingers
> and toes. What kind of shape would that person be in?[/color]


Less pointed?


Lyle Fairfield
Guest
 
Posts: n/a
#5: Nov 12 '05

re: A2k bug? Deleting db.props causes corrupt db


"Michael \(michka\) Kaplan [MS]" <michkap@online.microsoft.com> wrote in
news:3fa3cd13$1@news.microsoft.com:
[color=blue]
> Yes, Lyle is right -- this is NOT a bug, and it is frightening that anyone
> would think it is.
>
> If your db was a abody, this would be like chopping off all of the fingers
> and toes. What kind of shape would that person be in?[/color]

Indiginant?

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Arno R
Guest
 
Posts: n/a
#6: Nov 12 '05

re: A2k bug? Deleting db.props causes corrupt db


Huh..., didn't mean to offend anybody ...
Obviously I 'treated' Access a bit too hard in someone's opinion ?

I am just testing some weird things to find a solution for other issues I run into.

Did some more testing:
I found out that you only need ONE line of code to get the same behaviour.
This time it is not like "running an acetylene torch" or something like that I hope ;-)

Try this on a fresh and new A2k db: CurrentDb.Properties.Delete "AccessVersion"
It is this property that is critical as it seems.
Of course I can understand that this is a property that is needed...<grin>

Still think it's no good that I can delete this property without any warning.
I had the impression that I couldn't delete some critical build-in properties as stated in the help
(error 3384)

Because I like playing with fire I just did some more testing: ;-)
Try the same (CurrentDb.Properties.Delete "AccessVersion") in Access97 and there is NO problem!
You can even try the loop and still no problem.

Again: As I stated I was just testing ... This is no real-life code of course !!

Maybe A97 is just more "acetylene torch-resistant?"

Arno R


"Michael (michka) Kaplan [MS]" <michkap@online.microsoft.com> schreef in bericht
news:3fa3cd13$1@news.microsoft.com...[color=blue]
> Yes, Lyle is right -- this is NOT a bug, and it is frightening that anyone
> would think it is.
>
> If your db was a abody, this would be like chopping off all of the fingers
> and toes. What kind of shape would that person be in?
>
>
> --
> MichKa [MS]
> NLS Collation/Locale/Keyboard Development
> Globalization Infrastructure and Font Technologies
>
> This posting is provided "AS IS" with
> no warranties, and confers no rights.
>
>
>
>
> "Lyle Fairfield" <MissingAddress@Invalid.Com> wrote in message
> news:Xns9426642495BA8FFDBA@130.133.1.4...[color=green]
> > "Arno R" <arracomn_o_s_p_a_m@tiscali.nl> wrote in
> > news:3fa3b948$0$79336$5fc3050@dreader2.news.tiscal i.nl:
> >[color=darkred]
> > > Hi all
> > > In another thread I had problems changing db.props
> > > Another problem I encountered while testing this: db corrupt
> > > When I deleted db.props through code in a loop I could not start the db
> > > again ... @#$%$
> > >
> > > Warning: Don't just try following code on any existing db. Make sure
> > > there is a copy! (I did ...)
> > >
> > > To test I created a NEW db in A2000 and just set some properties (menu
> > > StartUpOptions) Props like: AppTitle, StartUpForm, StartUpShowDBWindow,
> > > StartUpShowStatusBar AllowShortcutMenus, AllowFullMenus,
> > > AllowBuiltInToolbars, AllowToolbarChanges, AllowSpecialKeys
> > >
> > > When you run the following code and close the db, you can't get in
> > > again. Also compact and repair doesn't work.
> > >
> > > (Just tested: Also even without changing or creating any props the code
> > > kills the db!)
> > >
> > > Sub TestProps()
> > > Dim i As Integer
> > > On Error Resume Next 'You can't delete build-in props
> > > For i = 0 To CurrentDb.Properties.Count - 1
> > > Debug.Print CurrentDb.Properties(i).Name 'just to see what
> > > happpens CurrentDb.Properties.Delete CurrentDb.Properties(i).Name
> > > Next i
> > > End Sub
> > >
> > > After running this code and opening the db again:
> > > Access 'complained' that the db was converted from a previous version by
> > > using DAO method CompactDatabase etc.
> > > (Message in Dutch, translation maybe not 100% )
> > >
> > > I know I have to treat Access 'gently' but sometimes I really
> > > #$#%$$^$^%&* Any comments? Anything wrong with the code?
> > >
> > > TIA
> > > Arno R[/color]
> >
> > I ran an acetylene torch over my hard drive for less than 10 minutes and
> > my database was corrupted too. Ain't Microsoft BAD!? Huh?
> >
> > --
> > Lyle
> > (for e-mail refer to http://ffdba.com/contacts.htm)[/color]
>
>[/color]







Michael \(michka\) Kaplan [MS]
Guest
 
Posts: n/a
#7: Nov 12 '05

re: A2k bug? Deleting db.props causes corrupt db


It is dumb to *ever* delete what one does not understand. Please stop now
and limit your experiments to reasonable behavior that does not involve
random deletions.

Thanks,


--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies

This posting is provided "AS IS" with
no warranties, and confers no rights.


"Arno R" <arracomn_o_s_p_a_m@tiscali.nl> wrote in message
news:3fa4e364$0$79338$5fc3050@dreader2.news.tiscal i.nl...[color=blue]
> Huh..., didn't mean to offend anybody ...
> Obviously I 'treated' Access a bit too hard in someone's opinion ?
>
> I am just testing some weird things to find a solution for other issues I[/color]
run into.[color=blue]
>
> Did some more testing:
> I found out that you only need ONE line of code to get the same behaviour.
> This time it is not like "running an acetylene torch" or something like[/color]
that I hope ;-)[color=blue]
>
> Try this on a fresh and new A2k db: CurrentDb.Properties.Delete[/color]
"AccessVersion"[color=blue]
> It is this property that is critical as it seems.
> Of course I can understand that this is a property that is needed...<grin>
>
> Still think it's no good that I can delete this property without any[/color]
warning.[color=blue]
> I had the impression that I couldn't delete some critical build-in[/color]
properties as stated in the help[color=blue]
> (error 3384)
>
> Because I like playing with fire I just did some more testing: ;-)
> Try the same (CurrentDb.Properties.Delete "AccessVersion") in Access97 and[/color]
there is NO problem![color=blue]
> You can even try the loop and still no problem.
>
> Again: As I stated I was just testing ... This is no real-life code of[/color]
course !![color=blue]
>
> Maybe A97 is just more "acetylene torch-resistant?"
>
> Arno R
>
>
> "Michael (michka) Kaplan [MS]" <michkap@online.microsoft.com> schreef in[/color]
bericht[color=blue]
> news:3fa3cd13$1@news.microsoft.com...[color=green]
> > Yes, Lyle is right -- this is NOT a bug, and it is frightening that[/color][/color]
anyone[color=blue][color=green]
> > would think it is.
> >
> > If your db was a abody, this would be like chopping off all of the[/color][/color]
fingers[color=blue][color=green]
> > and toes. What kind of shape would that person be in?
> >
> >
> > --
> > MichKa [MS]
> > NLS Collation/Locale/Keyboard Development
> > Globalization Infrastructure and Font Technologies
> >
> > This posting is provided "AS IS" with
> > no warranties, and confers no rights.
> >
> >
> >
> >
> > "Lyle Fairfield" <MissingAddress@Invalid.Com> wrote in message
> > news:Xns9426642495BA8FFDBA@130.133.1.4...[color=darkred]
> > > "Arno R" <arracomn_o_s_p_a_m@tiscali.nl> wrote in
> > > news:3fa3b948$0$79336$5fc3050@dreader2.news.tiscal i.nl:
> > >
> > > > Hi all
> > > > In another thread I had problems changing db.props
> > > > Another problem I encountered while testing this: db corrupt
> > > > When I deleted db.props through code in a loop I could not start the[/color][/color][/color]
db[color=blue][color=green][color=darkred]
> > > > again ... @#$%$
> > > >
> > > > Warning: Don't just try following code on any existing db. Make sure
> > > > there is a copy! (I did ...)
> > > >
> > > > To test I created a NEW db in A2000 and just set some properties[/color][/color][/color]
(menu[color=blue][color=green][color=darkred]
> > > > StartUpOptions) Props like: AppTitle, StartUpForm,[/color][/color][/color]
StartUpShowDBWindow,[color=blue][color=green][color=darkred]
> > > > StartUpShowStatusBar AllowShortcutMenus, AllowFullMenus,
> > > > AllowBuiltInToolbars, AllowToolbarChanges, AllowSpecialKeys
> > > >
> > > > When you run the following code and close the db, you can't get in
> > > > again. Also compact and repair doesn't work.
> > > >
> > > > (Just tested: Also even without changing or creating any props the[/color][/color][/color]
code[color=blue][color=green][color=darkred]
> > > > kills the db!)
> > > >
> > > > Sub TestProps()
> > > > Dim i As Integer
> > > > On Error Resume Next 'You can't delete build-in props
> > > > For i = 0 To CurrentDb.Properties.Count - 1
> > > > Debug.Print CurrentDb.Properties(i).Name 'just to see what
> > > > happpens CurrentDb.Properties.Delete CurrentDb.Properties(i).Name
> > > > Next i
> > > > End Sub
> > > >
> > > > After running this code and opening the db again:
> > > > Access 'complained' that the db was converted from a previous[/color][/color][/color]
version by[color=blue][color=green][color=darkred]
> > > > using DAO method CompactDatabase etc.
> > > > (Message in Dutch, translation maybe not 100% )
> > > >
> > > > I know I have to treat Access 'gently' but sometimes I really
> > > > #$#%$$^$^%&* Any comments? Anything wrong with the code?
> > > >
> > > > TIA
> > > > Arno R
> > >
> > > I ran an acetylene torch over my hard drive for less than 10 minutes[/color][/color][/color]
and[color=blue][color=green][color=darkred]
> > > my database was corrupted too. Ain't Microsoft BAD!? Huh?
> > >
> > > --
> > > Lyle
> > > (for e-mail refer to http://ffdba.com/contacts.htm)[/color]
> >
> >[/color]
>
>
>
>
>
>
>[/color]


Arno R
Guest
 
Posts: n/a
#8: Nov 12 '05

re: A2k bug? Deleting db.props causes corrupt db


MichKa,

Well, I DID some 'strange' tests and indeed DID ask for comments ...
but why on earth are you trying to offend me?
Please stop now, indeed ...

If I did something *so very* wrong would someone PLEASE explain this to me?

Thanks,
Arno R

[color=blue]
> It is dumb to *ever* delete what one does not understand. Please stop now
> and limit your experiments to reasonable behavior that does not involve
> random deletions.
>
> Thanks,
>
>
> --
> MichKa [MS][/color]











Phobos
Guest
 
Posts: n/a
#9: Nov 12 '05

re: A2k bug? Deleting db.props causes corrupt db


"Lyle Fairfield" <MissingAddress@Invalid.Com> wrote in message
news:Xns9426A46E0EAF5FFDBA@130.133.1.4...[color=blue]
> "Michael \(michka\) Kaplan [MS]" <michkap@online.microsoft.com> wrote in
> news:3fa3cd13$1@news.microsoft.com:
>[color=green]
> > Yes, Lyle is right -- this is NOT a bug, and it is frightening that[/color][/color]
anyone[color=blue][color=green]
> > would think it is.
> >
> > If your db was a abody, this would be like chopping off all of the[/color][/color]
fingers[color=blue][color=green]
> > and toes. What kind of shape would that person be in?[/color]
>
> Indiginant?[/color]

Is that a real word?

Or do you mean "indignant"?

I think it should be a word! I'm going to use it in conversation sometime
this week and when someone asks what it means I'm going to say:

"It means someone with no fingers or toes, don't you know anything?"

<g>

P



Douglas J. Steele
Guest
 
Posts: n/a
#10: Nov 12 '05

re: A2k bug? Deleting db.props causes corrupt db


That's MichKa's way: he doesn't pull punches.

He's correct, though. Why would you try to delete anything without a
legitimate reason to so do? Would you remove the chips from your computer
just to see what impact that would have? Why do you assume "You can't delete
build-in props", as the comment in your code states?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)



"Arno R" <arracomn_o_s_p_a_m@tiscali.nl> wrote in message
news:3fa55129$0$79333$5fc3050@dreader2.news.tiscal i.nl...[color=blue]
> MichKa,
>
> Well, I DID some 'strange' tests and indeed DID ask for comments ...
> but why on earth are you trying to offend me?
> Please stop now, indeed ...
>
> If I did something *so very* wrong would someone PLEASE explain this to[/color]
me?[color=blue]
>
> Thanks,
> Arno R
>
>[color=green]
> > It is dumb to *ever* delete what one does not understand. Please stop[/color][/color]
now[color=blue][color=green]
> > and limit your experiments to reasonable behavior that does not involve
> > random deletions.
> >
> > Thanks,
> >
> >
> > --
> > MichKa [MS][/color]
>
>
>
>
>
>
>
>
>
>
>[/color]


Arno R
Guest
 
Posts: n/a
#11: Nov 12 '05

re: A2k bug? Deleting db.props causes corrupt db


Hi Doug,
Thanks for a 'not flaming' contribution.
[color=blue]
> He's correct, though. Why would you try to delete anything without a
> legitimate reason to so do? Would you remove the chips from your computer
> just to see what impact that would have? Why do you assume "You can't delete
> build-in props", as the comment in your code states?[/color]

Please try (with a new db, so it definitely won't hurt...)
CurrentDb.Properties.Delete "Transactions"
You will see a message that states that you can't delete build-in props (error 3384).
That's why I thought the code would only delete the 'new' or 'added' properties.

I wanted to delete the properties that I had set trough code because I had difficulties to change
them.
Please look at the recent thread 'Only admin can change db.props' if you want to know more.

TC advised to look at the DDL-property.
I did and the Help stated that to set this property again I first had to delete the props ...
That's why I tested with the loop-code to delete *only* the props that I thought I had set.
I just expected that Access would stop me to delete the build-in props (especially the critical
ones...)

I got this error message (which is all crap!) and couldn' get in the db anymore.
Also at that moment A2k-vba Help wasn't working so I was a bit pissed off ...
(I completely re-installed Office2k including SP3 and still no go ... but this is a different story
....)

So I tested more and more on the db.props.
I just want to know! What's wrong with that?
What's wrong with sharing what I found?

Thanks
Arno R


TC
Guest
 
Posts: n/a
#12: Nov 12 '05

re: A2k bug? Deleting db.props causes corrupt db



"Arno R" <arracomn_o_s_p_a_m@tiscali.nl> wrote in message
news:3fa58d78$0$79347$5fc3050@dreader2.news.tiscal i.nl...

(snip)
[color=blue]
> So I tested more and more on the db.props.
> I just want to know! What's wrong with that?
> What's wrong with sharing what I found?[/color]

Don't sweat it!

It looked to some readers as if you were deleting random things just for the
hell of it, to see what would happen.

But your last post made it clear what you were actually trying to achieve.

TC



Michael \(michka\) Kaplan [MS]
Guest
 
Posts: n/a
#13: Nov 12 '05

re: A2k bug? Deleting db.props causes corrupt db


What you did wrong was assuming that PRE-EXISTING is the same a BUILT-IN.
They are not the same.

Access relies on properties IT sets through the JPN (Jet Property Manager),
and by deleting these (while trying to fix your own props you added) you
corrupted your database. THAT is what you did wrong.


--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies

This posting is provided "AS IS" with
no warranties, and confers no rights.


"Arno R" <arracomn_o_s_p_a_m@tiscali.nl> wrote in message
news:3fa55129$0$79333$5fc3050@dreader2.news.tiscal i.nl...[color=blue]
> MichKa,
>
> Well, I DID some 'strange' tests and indeed DID ask for comments ...
> but why on earth are you trying to offend me?
> Please stop now, indeed ...
>
> If I did something *so very* wrong would someone PLEASE explain this to[/color]
me?[color=blue]
>
> Thanks,
> Arno R
>
>[color=green]
> > It is dumb to *ever* delete what one does not understand. Please stop[/color][/color]
now[color=blue][color=green]
> > and limit your experiments to reasonable behavior that does not involve
> > random deletions.
> >
> > Thanks,
> >
> >
> > --
> > MichKa [MS][/color]
>
>
>
>
>
>
>
>
>
>
>[/color]


David W. Fenton
Guest
 
Posts: n/a
#14: Nov 12 '05

re: A2k bug? Deleting db.props causes corrupt db


michkap@online.microsoft.com (Michael (michka) Kaplan [MS]) wrote
in <3fa80357@news.microsoft.com>:
[color=blue]
>What you did wrong was assuming that PRE-EXISTING is the same a
>BUILT-IN. They are not the same.
>
>Access relies on properties IT sets through the JPN (Jet Property
>Manager), and by deleting these (while trying to fix your own
>props you added) you corrupted your database. THAT is what you did
>wrong.[/color]

I don't think most people understand that an Access database is a
special kind of Jet database, that Access adds properties that are
essential to Access working properly that are not part of Jet per
se.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Closed Thread