Jump to content

ADODB.Connection in wine


Recommended Posts

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

Link to comment
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

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
Link to comment
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
Link to comment
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

Link to comment
Share on other sites

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
Link to comment
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
Link to comment
Share on other sites

$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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...