You have several obstacles in your course which might or might not be easy to navigate:
Perl cannot easily access COM objects. Any access to COM requires Perl on Windows1. If they are OLE objects, you can easily access them on the Windows machine by using Win32::OLE.
If you need the data on Linux, either push the data from Windows to the Linux MySQL database using ODBC and/or DBD::MySQL or serve the data retrieved from the OLE object as files or via a Perl program to the Linux machine.
1 I know that technically you can use COM over the network by using DCOM and/or SUN/RPCE, but as I have done so in a former life, I wouldn't recommend this to anybody without dire need.
| [reply] |
we have a Foxpro Application and need to share data accross the web and read it in to a MySQL DB. After a user has edited it (no problem there) it should be transferred back.
I guess using Foxpro is the real wtf here =)
Anyway, as already stated you cannot use OLE on the linux server side easily, so I suggest that you create some kind of Server/API on the application machine and let your webserver communicated with that, instead of directly to the DB. Then you can use any protocoll you want and you abstract away database specicfic code on your webserver.
You get the idea. The possibilities for implementing this are endless. Chose from plain get/post, soap, xml-rpc, csv, or whatever for transportation and HTTP::Server::Simple, Catalyst, Jifty, etc. for the code. Writing a simple CRUD application with one of the advanced frameworks is a piece of cake. You should be able to set one up within minutes. While I'm at it, I think I should also point you at DBD::Xbase, just in case you didn't already know about it.
update: I forgot to mention, if you for whatever reason still need to use COM and OLE (yes they belong together) have a look at the Perl Dev Kit
| [reply] [d/l] |
I couldn't immediately find anything in CPAN that looked like it would help.
If you're not talking about large volumes of data, I'd propose a dinosaur solution: create a CSV file and ship that back and forth. | [reply] |
I haven't tried this, but the Win32::OLE documentation of the new method says:
To create an object via DCOM on a remote server you can use an array reference in place of PROGID.
The referenced array must contain the machine name and the program id or class id. For example:
my $obj = Win32::OLE->new(['my.machine.com', 'Program.Id']
+);
A word spoken in Mind will reach its own level, in the objective world, by its own wei ght
| [reply] [d/l] [select] |
As mentioned above, you could probably use DBD::Xbase to talk to your Foxpro app on your Windows server. You could then use DBD::Proxy to talk to Foxpro from your Linux box. | [reply] |