WIne, Access 97 and mysql question/problem

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
wpflum
Level 1
Level 1
Posts: 9
Joined: Mon Mar 16, 2009 2:54 pm

WIne, Access 97 and mysql question/problem

Post by wpflum »

I'm trying to get Access 97 running under wine and have it connect to a mysql server running on the linux side of the machine. I was able to get Access 97 installed and it runs good but no matter what I do I cannot get it to connect to the mysql server through the odbc connector.

I've tried it with the wine odbc stub and while I can get isql to hit the database on the linux side no matter what I do i get the 'no default database error' on the windows side when I try to access odbc.

I've tried using the native odbc manager and mysql-odbc connector and while I can get a 'passed' test when I create the odbc source I get a 'No database selected (#1046)" error when I select the odbs source in Access.

I'm running Centos 5 and was using the wine that came in to the system through the Yum installer and got the errors so I downloaded and compilied the latest and greatest version from the web, version 1.1.16 thinking it might be some kind of 'bug' with the version I had but I still get the same errors doing either way again.

I feel like I'm so close to getting this to work but I keep pulling my hair out.

Any ideas??
Daniel Kasak

WIne, Access 97 and mysql question/problem

Post by Daniel Kasak »

On Mon, 2009-03-16 at 15:07 -0500, wpflum wrote:
I'm trying to get Access 97 running under wine and have it connect to a
mysql server running on the linux side of the machine. I was able to
get Access 97 installed and it runs good but no matter what I do I
cannot get it to connect to the mysql server through the odbc
connector.
OK firstly, I don't know that you're going to get acceptable results out
of Wine and Access. I dedicated quite a bit of time to this at my
previous job, and ended up deciding it wasn't going to be stable enough.
At the time I was trying both the open-source wine and CrossOver Office.
If you don't have access to a Windows system, it might *just* be OK for
exporting your data, copying some VB code out, making screenshots of
query designs, etc, but I would *strongly* advise against using in a
production environment.

Secondly, the *only* connector I got going successfully was
MyODBC-3.51.12. They changed something shortly after this which broke
compatibility with wine / crossover, as far as I could tell. From memory
I needed MSDAC-2.6 ( Microsoft Data Access Components ), but this could
have been more to do with my code that MyODBC ... can't remember.

Shameless plug alert ...

What I eventually did ( after investigating OpenOffice, Kylix and
Rekally ) was to write myself some Perl classes to manage recordsets and
bind them to Gtk2 widgets ( you build the UI in Glade, which is a GUI
editor for Gtk2 apps ). This ended up being far more successful than I
ever imagined it would be, and now I have a number of large production
systems running on it. All the classes are open-source and
cross-platform ( installed on 50% linux, 50% windows 2000 desktops ),
and available from cpan or on my website:
http://entropy.homelinux.org/axis/ ( there are some screenshots of
production systems there somewhere ).

I'm also working on a GUI builder for setting everything up, but it's on
the backburner as I have a 7-month old baby and he's taking up *all* my
free time.

Anyway if you're looking to get a database front-end going on Linux,
this is how I'd do it. Sure you have to rebuild your GUI ( yeah ... and
code ), but you pick up some very nice advantages along the way. Gtk2 is
a much nicer toolkit than Access' limited widget set - you get dynamic
resizing of widgets / forms, a *real* MVC treeview widget, themable
interface, etc. Also Perl is a much nicer language than VB :) And it's
all cross-platform, which is a much better solution in the long term
that trying to get Access running under Wine, and then stop MAD ( Mad
Access Disease ) and the endless cycle of crash, compact & repair,
crash, compact & repair ... ... ... I'm sure you know what I mean.

Dan
wpflum
Level 1
Level 1
Posts: 9
Joined: Mon Mar 16, 2009 2:54 pm

Post by wpflum »

What I'm trying to do is take a bunch of Access databases that I print reports from and configure them to do the reports from a macro and then run Access from the command line to just print the reports out. This way I wouldn't have to try and re-write them in something else and I could have stable platform to work from. If I can do this then any changes or additions I need to do I could do on an emulated PC on vmware from my desktop and then just copy the database over to the server. I'd like to set up a cron job to spit these reports out at the end of every month so I don't forget to run them. Speed isn't much of an issue, I don't care if it takes an hour to print out the reports just so that I CAN print them out from Linux.

I'll see if I can dig up the earlier version of the connector and MDAC to see if they work.

Thanks

By the way, there is no such thing as 'Free Time' after you have kids, its just a myth :)

I have three girls, 8,10 and 12 all going on sixteen so when I'm not fixing something they 'accidentally' broke I'm refereeing fights........
wpflum
Level 1
Level 1
Posts: 9
Joined: Mon Mar 16, 2009 2:54 pm

Post by wpflum »

One question, when you say you used MyODBC-3.51.12 did you mean the linux side or the windows side?
Daniel Kasak

WIne, Access 97 and mysql question/problem

Post by Daniel Kasak »

On Tue, 2009-03-17 at 08:00 -0500, wpflum wrote:
One question, when you say you used MyODBC-3.51.12 did you mean the linux side or the windows side?
The Windows side. To access a MySQL data source from inside Access, you
need to have an ODBC driver registered in the 'windows' side. If you
can't get MyODBC to work, then you can try other ODBC interfaces - maybe
from Easysoft or something.

By the way, I've made a reporting module too ... PDF::ReportWriter. You
can define reports in XML, and then pass them an array of data, and
render a PDF report.

Dan
fcmartins
Level 4
Level 4
Posts: 114
Joined: Sat Nov 01, 2008 5:48 pm

Post by fcmartins »

OT, but did any of you manage to add controls to forms/reports in design mode?
wpflum
Level 1
Level 1
Posts: 9
Joined: Mon Mar 16, 2009 2:54 pm

Post by wpflum »

Got it working using the versions you had used. Seems to work just like I need it to now I just have to modify the reports to grab the current date when they run.

I haven't tried to do anythen else yet other than modify some of the vba code in the reports so I'm not sure about the forms/control issue. I do have one really weird issue which i can get around by editing the Access program on an emulated version of windows, when I'm in the vba screen and press the comma key I get kicked out of wine right back to the command prompt. Was driving me crazy as I needed to add some code that had a few commas, weird!

........

Just went and tried to make a form and add controls and it seems to be working, what kind of controls are you trying to use that are failing?

Bill
fcmartins
Level 4
Level 4
Posts: 114
Joined: Sat Nov 01, 2008 5:48 pm

Post by fcmartins »

I can't place any control from the toolbox. When I drop the control into the form, two empty error messages appear (no title even) and the terminal shows msgs like this:

fixme:typelib2:ICreateTypeInfo2_fnAddRefTypeInfo (0x816b038,0x8120590,0x32f690), pTInfo from different typelib.
fixme:typelib2:ICreateTypeInfo2_fnSetCustData (0x816b4f0,{ba65d790-9301-11cf-8d22-00aa00375384},0x32f66c), stub!
fixme:ole:OleQueryLinkFromData (0x1492f0),stub!
fixme:ole:OleQueryLinkFromData (0x1492f0),stub!
fixme:ole:OleQueryLinkFromData (0x1492f0),stub!

Did you use winetricks for any extra install/override?
wpflum
Level 1
Level 1
Posts: 9
Joined: Mon Mar 16, 2009 2:54 pm

Post by wpflum »

The only thing I did was to use the work around to install Access by forcing a few dll to be native microsoft ones instead of wines built in ones.

ole32.dll, oleaut32.dll, olepro32.dll, rpcrt4.dll, stdole2.tlb and stdole32.tlb all were set to native override.

That got Access 97 installed without the error popping up at the end of the install.

Then odbc32.dll and odbccp32.dll got set to native after that to make wine let the ODBC drivers from windows.
fcmartins
Level 4
Level 4
Posts: 114
Joined: Sat Nov 01, 2008 5:48 pm

Post by fcmartins »

Hmm, by removing some install options (e.g. calendar) the install worked fine without those overrides. I made those dlls native override except for the last two (stdole2.tlb and stdole32.tlb) which do not exist in the overrides droplist. I put STDOLE2.TLB in windows/system32 but it is still not available in winecfg.

How did you make an override for those two .tlb files?
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Post by dimesio »

fcmartins wrote:Hmm, by removing some install options (e.g. calendar) the install worked fine without those overrides. I made those dlls native override except for the last two (stdole2.tlb and stdole32.tlb) which do not exist in the overrides droplist. I put STDOLE2.TLB in windows/system32 but it is still not available in winecfg.

How did you make an override for those two .tlb files?
Type them in the droplist box.
fcmartins
Level 4
Level 4
Posts: 114
Joined: Sat Nov 01, 2008 5:48 pm

Post by fcmartins »

Ouch! That simple!

Anyway in the meanwhile I used winetricks to install dcom98 and it works beautifully.

Many thanks. It's great to have the best version of MS Access running in Linux :-)
Daniel Kasak

WIne, Access 97 and mysql question/problem

Post by Daniel Kasak »

On Wed, 2009-03-18 at 01:31 -0500, fcmartins wrote:
OT, but did any of you manage to add controls to forms/reports in design mode?
I assume you're asking me? Yes. But not reliably. It was *very* crashy.
In particular it would crash when saving. It would also crash when
copying / pasting. When Access crashes, it usually corrupts things. Oh
yeah ... I also had an infuriating focus issue, where Access / wine
would grab the keyboard and not release it.

But keep in mind I haven't tried this for quite a while ...

Dan
fcmartins
Level 4
Level 4
Posts: 114
Joined: Sat Nov 01, 2008 5:48 pm

Post by fcmartins »

Thanks for the heads up, Daniel. I don't have a big use for it, and none professionally nowadays. It's just for the good memories :-)
Cheers!
Locked