Sign in to follow this  
Followers 0
DeFirence

ADODB.Connection in wine

11 posts in this topic

Hi all,

I know that AutoItScript doesnt support linux, but if anyone could help me get this working i would really appreciate it.

I am trying to access a MySQL database using ODBC, which worked fine on windows.

Now on linux i have installed libmyodbc and set it up that its working fine, but i get a com error when creating a ADODB.Connection object under wine.

$ObjConn = ObjCreate("ADODB.Connection")

We intercepted a COM Error!!

err.description is:

err.windescription is: G?

err.lastdllerror is: 0

err.scriptline is: 5

err.number is: 800401F3

err.source is:

err.helpfile is:

err.helpcontext is:

I haven't read anything saying that you cant use ODBC in wine, so i can only assume i am creating the wrong object or something.

Regards,

DeFirence

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi all,

I know that AutoItScript doesnt support linux, but if anyone could help me get this working i would really appreciate it.

I am trying to access a MySQL database using ODBC, which worked fine on windows.

Now on linux i have installed libmyodbc and set it up that its working fine, but i get a com error when creating a ADODB.Connection object under wine.

$ObjConn = ObjCreate("ADODB.Connection")

I haven't read anything saying that you cant use ODBC in wine, so i can only assume i am creating the wrong object or something.

Regards,

DeFirence

I don't have a solution to your problem, as I don't have access to a Linux OS running Wine at the moment. However, if your program runs fine in Windows but not in Wine under Linux, I think you've found the problem. The only thing that comes to mind is object creation in Wine with libmyodbc. You may have to create the connection object differently. Edited by Airwolf

Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt

Share this post


Link to post
Share on other sites

Hi all,

I know that AutoItScript doesnt support linux, but if anyone could help me get this working i would really appreciate it.

I am trying to access a MySQL database using ODBC, which worked fine on windows.

Now on linux i have installed libmyodbc and set it up that its working fine, but i get a com error when creating a ADODB.Connection object under wine.

$ObjConn = ObjCreate("ADODB.Connection")

I haven't read anything saying that you cant use ODBC in wine, so i can only assume i am creating the wrong object or something.

Regards,

DeFirence

Google is your friend... WINE HQ: Getting Native ODBC Drivers Working:

MySQL ODBC

To use Windows ODBC drivers, you have to override Wine's odbccp32.dll and odbc32.dll with the native versions because the Wine versions are currently wired directly to Linux's unixodbc.

:)

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

Google is your friend... WINE HQ: Getting Native ODBC Drivers Working:

:)

Thanks alot, i already found that page, but now i got it installed.

I seem to be getting somewhere but i get this error:

We intercepted a COM Error!!

err.description is:

err.windescription is: ??/

err.lastdllerror is: 1815

err.scriptline is: 27

err.number is: 80020009

err.source is: Microsoft OLE DB Service Components

err.helpfile is:

err.helpcontext is: 0

Regards,

DeFirence

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Thanks alot, i already found that page, but now i got it installed.

I seem to be getting somewhere but i get this error:

Regards,

DeFirence

So... do we psychically divine what's going on at line 27 of your script, and what is no longer failing at line 5?

:)

Edited by PsaltyDS

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

ahh sorry, forgot to add that

its giving that error here:

$Objconn.open ("DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=test;UID=root;PWD=pass;PORT=3306")

Share this post


Link to post
Share on other sites

ahh sorry, forgot to add that

its giving that error here:

$Objconn.open ("DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=test;UID=root;PWD=pass;PORT=3306")
What was the code at line 5 that gave the first error? I'm trying to see what part does work...

:)


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

What was the code at line 5 that gave the first error? I'm trying to see what part does work...

$ObjConn = ObjCreate("ADODB.Connection")

Share this post


Link to post
Share on other sites

Still no luck, im still hoping someone knows muttley

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

$ObjConn = ObjCreate("ADODB.Connection")
So, you can create the connection object now, but opening the connection fails.

You set up a COM error handler, did you check the return values for clues? Does .lastdllerror = 1815, and .number = 80020009 cross to anything in the reference material?

Is TCPIP connectivity good to localhost? Can you ping localhost from Linux and from inside WINE? Do you see port 3306 open from inside WINE and out in Linux?

muttley

Edited by PsaltyDS

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

#11 ·  Posted (edited)

So, you can create the connection object now, but opening the connection fails.

You set up a COM error handler, did you check the return values for clues? Does .lastdllerror = 1815, and .number = 80020009 cross to anything in the reference material?

Is TCPIP connectivity good to localhost? Can you ping localhost from Linux and from inside WINE? Do you see port 3306 open from inside WINE and out in Linux?

muttley

Using the ODBC Config utility under wine i can successfully connect to the MySQL database on LocalHost, so the TCPIP is working fine.

I Googled "80020009" and it gives alot of info on the 80020009 ODBC error, but none that helps this situation, since im getting the error when i execute the .open function.

Edited by DeFirence

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  
Followers 0