Jump to content
Sign in to follow this  
emanemos

Access 2010 with AutoIt

Recommended Posts

emanemos

Hi from France,

Friday, I used this code : Access 2010 with AutoIT.

Today, the code doesn't work : no result & no error. The Access BDD doesn't open (NA.ldb)

Have you an idea ?

Thanks

#include <access.au3>
$Db_oConn = objCreate("ADODB.Connection")
$Db_oRS = objCreate("ADODB.RecordSet")
$Db_oConn.Open("Driver={Microsoft Access Driver (*.mdb)};Dbq="& $path  &  "BDD\NA.mdb")
$Db_oRS.Open('exec Disabled', $Db_oConn, 1, 3)

Share this post


Link to post
Share on other sites
water

You need to do some error checking.

Add the following lines to the top of your script:

#include <Debug.au3>
_DebugSetup()
_DebugCOMError()

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
emanemos
Thanks :


@@ DEBUG COM Error encountered in test.au3 (83) :
 Number         = 0x80020009 (-2147352567)
 WinDescription = Une exception s’est produite.
 Description    = Le pilote spécifié n'a pas été chargé en raison de l'erreur système  126: Le module spécifié est introuvable. (Microsoft Access Driver (*.mdb), C:\Windows\system32\odbcjt32.dll).
 Source         = Microsoft OLE DB Provider for ODBC Drivers
 HelpFile       =
 HelpContext    = 0
 LastDllError   = 0
 Retcode        = 0x80004005

Do  U know the driver thtat I should  use ?

Share this post


Link to post
Share on other sites
water

What is the value of $path?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
emanemos

$path = "c:usersemanemos"

I've downloaded odbcjt32.dll; erreur systeme 193 instead of 126 with debug

Access 2010 and windows 7

Edited by emanemos

Share this post


Link to post
Share on other sites
water

Windows is 32 or 64 bit?

193 means "%1 is not a valid Win32 Application".


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
emanemos

It was a problem with SciTE; Ok with with SciTE Lite.

Yesterday,I uninstalled & installed Autoit and SciTE : OK

Thanks for your help

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  

×