Jump to content
Sign in to follow this  
TheBreeder

Error opening ADO mdb

Recommended Posts

TheBreeder

Hi,

i get an error when running a script to read a table in mdb on one computer and not on other computers. What is missin on that computer .

the rror messag is

E:\Vogel Administratie\Vogel_Administratie.au3 (38) : ==> The requested action with this object has failed.:

$oAdo.Open (@WorkingDir & '\vogel2009.mdb')

$oAdo.Open (@WorkingDir & '\vogel2009.mdb')^ ERROR

->21:26:47 AutoIT3.exe ended.rc:1

The file vogel2009.mdb exists on that drive and directory.


Elke vogel zingt zoals hij gebekt is !Als alleen die vogels zongen die het mooiste zingen zou het stil zijn in het bos.

Share this post


Link to post
Share on other sites
PsaltyDS

Hi,

i get an error when running a script to read a table in mdb on one computer and not on other computers. What is missin on that computer .

the rror messag is

E:\Vogel Administratie\Vogel_Administratie.au3 (38) : ==> The requested action with this object has failed.:

$oAdo.Open (@WorkingDir & '\vogel2009.mdb')

$oAdo.Open (@WorkingDir & '\vogel2009.mdb')^ ERROR

->21:26:47 AutoIT3.exe ended.rc:1

The file vogel2009.mdb exists on that drive and directory.

Add a COM error handler to get the details. It might be "Access denied" vice "File not found".

^_^


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
TheBreeder

I got the error 80020009

can you give me a hint to solve the problem ?


Elke vogel zingt zoals hij gebekt is !Als alleen die vogels zongen die het mooiste zingen zou het stil zijn in het bos.

Share this post


Link to post
Share on other sites
PsaltyDS

I got the error 80020009

can you give me a hint to solve the problem ?

So you got the error number, what was the windescription ($oMyError.windescription)?

^_^


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
TheBreeder

So you got the error number, what was the windescription ($oMyError.windescription)?

^_^

Class not registerd. How can i find the class that isn't registered ?

Thanks in advance.


Elke vogel zingt zoals hij gebekt is !Als alleen die vogels zongen die het mooiste zingen zou het stil zijn in het bos.

Share this post


Link to post
Share on other sites
PsaltyDS

Class not registerd. How can i find the class that isn't registered ?

Thanks in advance.

Did you check IsObj($oAdo) after creating your ADODB.Connection? Maybe ADO is broke on that box.

^_^


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
Authenticity

He's probably trying to open DSN which might not happen to be exist or he's not using the correct way to open a connection:

If not registered, it should be:

$oConnection = ObjCreate("ADODB.Connection")


$oConnection.Provider = "Microsoft.Jet.OLEDB.4.0"
$oConnection.ConnectionString = "Data Source = C:\UserData.mdb"
$oConnection.OpenoÝ÷ Øëz¬µêÞv+l¥u·ºÚ"µÍÌÍÛÐÛÛXÝ[ÛHØÜX]J ][ÝÐQÑÛÛXÝ[Û][ÝÊBÌÍÛÐÛÛXÝ[ÛÜ[ ][ÝÑÓ[YI][Ý

Most probably I'm wrong... ;]

Edit: ...or she ;]

Edited by Authenticity

Share this post


Link to post
Share on other sites
PsaltyDS

He's probably trying to open DSN which might not happen to be exist or he's not using the correct way to open a connection:

Good point. Once again, lack of code in the OP restricts the understanding of the issue.

^_^


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
TheBreeder

Good point. Once again, lack of code in the OP restricts the understanding of the issue.

^_^

The coding is working on one computer and not on another computer. I allways start from the same au3 file. The data is on a usb stick that travvels from one computer to the other computer. I think there is a problem with the installation of a dll or something.

I checked the result of the comnnection and the result is not "".

I tried also the two proposition done with the connectionstring, but it does not help.

this is the exact code I use

#include <Access.au3>

Global $oAdo, $oRec, $Fc ; DB variables

$oAdo = 'ADODB.Connection'

$oAdo= ObjCreate("ADODB.Connection")

if $oADO="" then msgbox(0,"","ado not correctly opened")

$oAdo.Provider = $adoProvider

$oAdo.open(@WorkingDir & "\vogel2009.mdb"


Elke vogel zingt zoals hij gebekt is !Als alleen die vogels zongen die het mooiste zingen zou het stil zijn in het bos.

Share this post


Link to post
Share on other sites
Authenticity

And vogel2009.mdb is located on the stick or at the current working directory?

Share this post


Link to post
Share on other sites
TheBreeder

And vogel2009.mdb is located on the stick or at the current working directory?

Yes

It seams i have a dll or ... wrongly installed.


Elke vogel zingt zoals hij gebekt is !Als alleen die vogels zongen die het mooiste zingen zou het stil zijn in het bos.

Share this post


Link to post
Share on other sites
TheBreeder

Yes

It seams i have a dll or ... wrongly installed.

I'm unistalling the Microsoft Office XP now and will reinstall afterwards to see if I still get the error.

Thanks for the help


Elke vogel zingt zoals hij gebekt is !Als alleen die vogels zongen die het mooiste zingen zou het stil zijn in het bos.

Share this post


Link to post
Share on other sites
Authenticity

You can try to register the .mdb file using the Data Sources dialog and open it without any farther specifications like provider, etc...

Just run odbcad32.exe, switch to System DSN tab and add it. You'll then use this DSN name to open it without any specifications and see if it works. If it works, it's not something with the dll.

Share this post


Link to post
Share on other sites
GEOSoft

If you downloaded the access.au3 file some time ago, and the machine that it doesn't work on has Access 2007 installed then it is more than likely related to the Provider string. The download was updated a week or so ago and you have to make sure that you use the new costants file that's in the zip.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
TheBreeder

If you downloaded the access.au3 file some time ago, and the machine that it doesn't work on has Access 2007 installed then it is more than likely related to the Provider string. The download was updated a week or so ago and you have to make sure that you use the new costants file that's in the zip.

I reinstalled my PC completely and it works.

Thanks all for your cooperation

Richard


Elke vogel zingt zoals hij gebekt is !Als alleen die vogels zongen die het mooiste zingen zou het stil zijn in het bos.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.