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 13 1948
"Arno R" <ar****************@tiscali.nl> wrote in
news:3f**********************@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 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
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)
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" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4... "Arno R" <ar****************@tiscali.nl> wrote in news:3f**********************@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 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
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]" <mi*****@online.microsoft.com> wrote in
message news:3f********@news.microsoft.com... 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?
Less pointed?
"Michael \(michka\) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in
news:3f********@news.microsoft.com: 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?
Indiginant?
--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
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]" <mi*****@online.microsoft.com> schreef in bericht
news:3f********@news.microsoft.com... 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" <Mi************@Invalid.Com> wrote in message news:Xn*******************@130.133.1.4... "Arno R" <ar****************@tiscali.nl> wrote in news:3f**********************@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 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
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)
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" <ar****************@tiscali.nl> wrote in message
news:3f**********************@dreader2.news.tiscal i.nl... 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]" <mi*****@online.microsoft.com> schreef in
bericht news:3f********@news.microsoft.com... 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" <Mi************@Invalid.Com> wrote in message news:Xn*******************@130.133.1.4... "Arno R" <ar****************@tiscali.nl> wrote in news:3f**********************@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
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
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)
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 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]
"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4... "Michael \(michka\) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in news:3f********@news.microsoft.com:
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?
Indiginant?
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
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" <ar****************@tiscali.nl> wrote in message
news:3f**********************@dreader2.news.tiscal i.nl... 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
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]
Hi Doug,
Thanks for a 'not flaming' contribution. 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?
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
"Arno R" <ar****************@tiscali.nl> wrote in message
news:3f**********************@dreader2.news.tiscal i.nl...
(snip) 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?
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
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" <ar****************@tiscali.nl> wrote in message
news:3f**********************@dreader2.news.tiscal i.nl... 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
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]
mi*****@online.microsoft.com (Michael (michka) Kaplan [MS]) wrote
in <3f******@news.microsoft.com>: 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.
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Thomas Philips |
last post by:
I have a question about deleting objects. My game has two classes,
Player and Alien, essentially identical, instances of which can shoot
at each other. Player is described below
class...
|
by: flupke |
last post by:
Hi,
i'm having trouble with deleting elements from a list in a for loop
============== test program ==============
el =
print "**** Start ****"
print "List = %s " % el
index = 0
for line...
|
by: Arno R |
last post by:
Hi there,
I just distributed an application in which I (try to) change db.properties depending on
CurrentUser()
For instance I set the property's AllowBypassKey and AllowBuiltinToolbars to False...
|
by: Mark |
last post by:
This question refers to a main form with a continuous form subform.
After an error occurs after entering several records in the subform, how can I
delete all the data in the main form and all the...
|
by: KC |
last post by:
Hello,
I am using Access 2002. WinXP, Template from MS called Orders Mgmt DB.
I have tweaked this DB to work for our small co.
It has worked pretty well up until I made the mistake of deleting...
|
by: Steve Drake |
last post by:
All,
If you right click on a word doc, you can see and set the custom props for
the document, how can this be done in C# (or any other lang)
I don't want to automate word as this will be...
|
by: badboybrown |
last post by:
Hello,
Is it possible to step through the "Create MDE" process and see what is
causing Access to crash?
I tried, unsuccessfully, many times to create an MDE from my database.
But, randomly, I...
|
by: maya |
last post by:
pls what is order of font-props when not specifying names of properties
in specification
can I assume this is the order:
http://www.w3.org/TR/REC-CSS2/fonts.html#font-properties
i.e., can I...
|
by: emphyrio |
last post by:
Hi, I am new to programming in vb. net. I have this problem:
I created a form with a datagrid. I can add records and then save them to a XML file, using this code on the click event of a button...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |