Can anyone help with the latest Tonys AutoFE?

S

SimeonD

Hi
I've been using the AutoFE for over two years now, and it works fine.
However, I want to use the %appdata% variable, which is only available in
newer versions.
I can't seem to get the latest version to work. I keep getting the same
error message, as below.
I've tried just updating the sample INI that came with 1.76, and its still
the same error.
Can someone have a quick look at this, to see if I'm doing anything
obviously wrong.
Thanks
Simeon


1019 - The following error occurred while attempting to determine the
Access/Jet version of the file 'X:\AutoFE\Test_Prog\\SSP_XP.ade' (while
using DAO Version 3.6)

Error: 0

---------- X:\AutoFE\Test_INIs\SSP_Test.ini--------------------
[Settings]
MainApp=%appdata%\My Database\
FileNameToStart=SSP_XP.ade
Server=X:\AutoFE\Test_Prog\

StartMethod=AutoSelect
Lockout=No
LockoutMsg=Sorry, not allowed into the system right now.
SupportMsg=Please contact your computer department for support.

ShortCutName=An excellent Access application
CreateShortCutOnDesktop=yes
CreateShortCutOnCommonDesktop=no
 
T

Tony Toews [MVP]

SimeonD said:
I've been using the AutoFE for over two years now, and it works fine.
However, I want to use the %appdata% variable, which is only available in
newer versions.
I can't seem to get the latest version to work. I keep getting the same
error message, as below.
I've tried just updating the sample INI that came with 1.76, and its still
the same error.
Can someone have a quick look at this, to see if I'm doing anything
obviously wrong.

The problem and not very good answer is buried deep in the following
page: http://www.granite.ab.ca/access/autofe.htm

Bugs and Problems

StartMethod=AutoSelect does not work with ADP files. I will be
working on a solution to this problem sometime soon. I'd suggest
using version V1.65 for now. Email me if this is a problem and I'll
see what I can do.

Note that I have no idea when I will have the time to fix this
problem.

Tony
 
S

SimeonD

Ah, I actually had no StartMethod=AutoSelect in my original, and I still had
the same problem.
Using 1.65, I get the message below.
I'll email your granite address.
Thanks for your help


*******************************************************************
The following error occurred while attempting to determine the Access/Jet
version of the file 'V:\APPS\SSP\ssp.ade' (while attempting to use DAO
Version 3.6)

Error: 3343 Unrecognized database format 'V:\APPS\SSP\SSP.ade'.

---------- C:\AutoFE\SSP.ini--------------------
[Settings]
MainApp=c:\program files\SSP\ssp.ade
Server=V:\APPS\SSP
;ShortCut=V:\APPS\AutoFE\SSP.lnk
;CommandLine=/runtime
;Shell=C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE
Lockout=No
LockoutMsg=Sorry, not allowed into the system right now.
CreateShortCutOnDesktop=No


;http://www.granite.ab.ca/access/autofe.htm
--------------------------------------------------------------------------------
Auto FE Updater Version: 1.65
Windows Version: Windows XP 5.1 build 2600 (Service Pack 3)
User: 123
Workstn: abc
 
S

SimeonD

Btw, both versions work fine when I use mdb.
But won't work when I use ADP or ADE.


SimeonD said:
Ah, I actually had no StartMethod=AutoSelect in my original, and I still
had the same problem.
Using 1.65, I get the message below.
I'll email your granite address.
Thanks for your help


*******************************************************************
The following error occurred while attempting to determine the Access/Jet
version of the file 'V:\APPS\SSP\ssp.ade' (while attempting to use DAO
Version 3.6)

Error: 3343 Unrecognized database format 'V:\APPS\SSP\SSP.ade'.

---------- C:\AutoFE\SSP.ini--------------------
[Settings]
MainApp=c:\program files\SSP\ssp.ade
Server=V:\APPS\SSP
;ShortCut=V:\APPS\AutoFE\SSP.lnk
;CommandLine=/runtime
;Shell=C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE
Lockout=No
LockoutMsg=Sorry, not allowed into the system right now.
CreateShortCutOnDesktop=No


;http://www.granite.ab.ca/access/autofe.htm
--------------------------------------------------------------------------------
Auto FE Updater Version: 1.65
Windows Version: Windows XP 5.1 build 2600 (Service Pack 3)
User: 123
Workstn: abc
--------------------------------------------------------------------------------


Tony Toews said:
The problem and not very good answer is buried deep in the following
page: http://www.granite.ab.ca/access/autofe.htm

Bugs and Problems

StartMethod=AutoSelect does not work with ADP files. I will be
working on a solution to this problem sometime soon. I'd suggest
using version V1.65 for now. Email me if this is a problem and I'll
see what I can do.

Note that I have no idea when I will have the time to fix this
problem.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Granite Fleet Manager http://www.granitefleet.com/
 
T

Tony Toews [MVP]

SimeonD said:
Btw, both versions work fine when I use mdb.
But won't work when I use ADP or ADE.

Correct. That's because I can use DAO to determine the Access version
in which an MDB/MDE is created so I can tell which version of Access
that is installed on the client system to start. However I can't
use DAO to determine the Access version in which an ADP/ADE is
created.

I need to either figure out how to determine the version of an ADP/ADE
or to figure out a method of ignoring this logic for ADP/ADEs and
doing something a bit different.

Tony
 
T

Tony Toews [MVP]

SimeonD said:
Ah, I actually had no StartMethod=AutoSelect in my original, and I still had
the same problem.

But StartMethod=AutoSelect is the default. If you can use a
different method there that would also take care of the problem.
Using 1.65, I get the message below.

Hmm, then I have no idea. I'll have to think about this a bit.

Tony
 
T

Tony Toews [MVP]

Tony Toews said:
I need to either figure out how to determine the version of an ADP/ADE

Hmm, there might be a way using ADO. Actually very similar to DAO
with slightly different syntax.

Tony
 
D

David W. Fenton

Hmm, there might be a way using ADO. Actually very similar to DAO
with slightly different syntax.

But, oh, isn't it so GREAT!!!!! that ADPs don't use Jet?
 
S

SimeonD

For comparison, here is the version that works with 1.4:

[Settings]
MainApp=c:\program files\SSP\ssp.ade
Server=V:\APPS\SSP
ShortCut=V:\APPS\AutoFE\SSP.lnk

Lockout=No
LockoutMsg=Sorry, not allowed into the system right now.
CreateShortCutOnDesktop=No


I realise you're a busy man, so extra thanks for you help on this. Do you
still need me to email you?
Btw, I read your blog most days, I wonder will this newsgroup post appear on
google.....
 
T

Tony Toews [MVP]

SimeonD said:
I realise you're a busy man, so extra thanks for you help on this. Do you
still need me to email you?
No.

Btw, I read your blog most days,

Glad I have readers there too.
I wonder will this newsgroup post appear on
google.....

It should.

Tony
 
T

Tony Toews [MVP]

Tony Toews said:
Hmm, there might be a way using ADO. Actually very similar to DAO
with slightly different syntax.

Probably the hardest part will be to figure out ADO late binding. I'm
currently using DAO late binding so I don't care what version of DAO
the user has installed.

Hmm, I have a vague memory of someone posting that ADO version 2.1 is
the standard for an old version of ADO that works for newer versions.

Tony
 
D

Douglas J. Steele

Tony Toews said:
Probably the hardest part will be to figure out ADO late binding.

What problem are you having with late binding of ADO? What specifically are
you trying to do?
Hmm, I have a vague memory of someone posting that ADO version 2.1 is
the standard for an old version of ADO that works for newer versions.

Not sure that's really relevant: all you should need is to use
CreateObject("ADODB.Connection") and so on.
 
T

Tony Toews [MVP]

Douglas J. Steele said:
What problem are you having with late binding of ADO?

None yet because I haven't tried it.
What specifically are you trying to do?

From a VB6 exe I want to open an Access ADP/ADE and determine the
version. The ADO equivalent of
MDBVersion = db.Properties("AccessVersion")
which is, I think,

CurrentProject.Properties("AccessVersion")
CurrentProject.Properties("Build")

I do not want to execute the ADP/ADE. I just want to read the
version.

Hmm, that was dumb of me. I found a bit of sample code and didn't
record it.
Not sure that's really relevant: all you should need is to use
CreateObject("ADODB.Connection") and so on.

Geez, if it's that simple I'm going to feel like an utter idiot for
not investigating this a *LOT* sooner.

Tony
 
D

Douglas J. Steele

Tony Toews said:
None yet because I haven't tried it.


From a VB6 exe I want to open an Access ADP/ADE and determine the
version. The ADO equivalent of
MDBVersion = db.Properties("AccessVersion")
which is, I think,

CurrentProject.Properties("AccessVersion")
CurrentProject.Properties("Build")

I do not want to execute the ADP/ADE. I just want to read the
version.

I've actually never used an ADP, but could you use Access Automation
somehow?

Something like

Dim appAccess As Object

Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase "pathtofile"

No, wait, you can't, because you might end up opening too old a version of
Access. What about

Set appAccess = CreateObject("Access.Application.12")
If Err.Number = 429 Then
' No Access 2007: try Access 2003
Set appAccess = CreateObject("Access.Application.11")
If Err.Number = 429 Then
' No Access 2003: try Access 2002

etc.
 
T

Tony Toews [MVP]

Douglas J. Steele said:
I've actually never used an ADP, but could you use Access Automation
somehow?

Something like

Dim appAccess As Object

Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase "pathtofile"

No, wait, you can't, because you might end up opening too old a version of
Access. What about

Set appAccess = CreateObject("Access.Application.12")
If Err.Number = 429 Then
' No Access 2007: try Access 2003
Set appAccess = CreateObject("Access.Application.11")
If Err.Number = 429 Then
' No Access 2003: try Access 2002

etc.

Well, I don't want to startup Access as that would take a few seconds.
So I just want to use the builtin DAO/ADO libraries to get the
version.

BTW this is for the Auto FE Updater.

Tony
 
D

Douglas J. Steele

Tony Toews said:
Well, I don't want to startup Access as that would take a few seconds.
So I just want to use the builtin DAO/ADO libraries to get the
version.

BTW this is for the Auto FE Updater.

Yeah, I understand exactly what you're trying to do.

Here's late binding to create a connection to an access mdb and then write
out all of the properties of the connection:

Dim con As Object
Dim prp As Object
Dim strConnect As String

strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Folder\File.mdb;"
Set con = CreateObject("ADODB.Connection")
con.ConnectionString = strConnect
con.Open
For Each prp In con.Properties
Debug.Print prp.Name & " = " & prp.Value
Next prp
con.Close
Set con = Nothing

See whether there's anything useful for you doing that.
 
T

Tony Toews [MVP]

Douglas J. Steele said:

When I run the above against an ADP I get the following error:

?err.Number
-2147467259
?err.Description
Unrecognized database format 'Q:\1 access\testing\TestADO.adp'.

When I run it against an MDB I get all kinds of properties but nothing
at first glance that's useful.

I'll continue poking about though.

Tony
 
D

Douglas J. Steele

Tony Toews said:
When I run the above against an ADP I get the following error:

?err.Number
-2147467259
?err.Description
Unrecognized database format 'Q:\1 access\testing\TestADO.adp'.

Hmm. That kind of makes sense. Given that an ADP strictly goes against SQL
Server, what relevance is the version of the ADP file?
 
T

Tony Toews [MVP]

Douglas J. Steele said:
Hmm. That kind of makes sense. Given that an ADP strictly goes against SQL
Server, what relevance is the version of the ADP file?

But it's available if you use CurrentProject so ....


Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top