DeFirence Posted July 2, 2008 Share Posted July 2, 2008 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 More sharing options...
Airwolf Posted July 2, 2008 Share Posted July 2, 2008 (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 July 2, 2008 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 More sharing options...
PsaltyDS Posted July 2, 2008 Share Posted July 2, 2008 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 More sharing options...
DeFirence Posted July 2, 2008 Author Share Posted July 2, 2008 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: 1815err.scriptline is: 27err.number is: 80020009err.source is: Microsoft OLE DB Service Componentserr.helpfile is: err.helpcontext is: 0Regards,DeFirence Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 2, 2008 Share Posted July 2, 2008 (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,DeFirenceSo... do we psychically divine what's going on at line 27 of your script, and what is no longer failing at line 5? Edited July 2, 2008 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 More sharing options...
DeFirence Posted July 2, 2008 Author Share Posted July 2, 2008 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") Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 2, 2008 Share Posted July 2, 2008 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 More sharing options...
DeFirence Posted July 2, 2008 Author Share Posted July 2, 2008 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") Link to comment Share on other sites More sharing options...
DeFirence Posted July 4, 2008 Author Share Posted July 4, 2008 Still no luck, im still hoping someone knows muttley Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 4, 2008 Share Posted July 4, 2008 (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 July 4, 2008 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 More sharing options...
DeFirence Posted July 4, 2008 Author Share Posted July 4, 2008 (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? muttleyUsing 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 July 4, 2008 by DeFirence Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now