Hi -

My suggestion is to use ODBC in perl for MS Access access:

1> get latest DBI module from CPAN (if you don't already have it)

2> same with DBD::ODBC

3> I don't know Windows 98, but somewhere in control panel or
   admin tools there is an ODBC setup program. Go into this
   and create an ODBC source pointing to your access db. Please
   post again if you can't find this.

4> try something like:

use DBI;

    my $connect = 'ODBC:whatever_your_ODBC_source_is';

        print "connecting to $connect\n";

        my $dbh = DBI->connect("DBI:$connect", "", "")
                || die "could not connect to $connect\n$DBI::errstr\n";

        print "connected to $connect\n";

        $dbh->disconnect
                || die ("could not discommect from $connect:\n$DBI::errstr\n");

5> now put your "guts" between the connect and disconnect above
   using DBI methods (prepare, execute, do...), The
   DBI documentation is good...

6> best of luck...

Aloha => Beau.


-----Original Message-----
From: Cleiton L. Siqueira [mailto:cleiton@;colegiomonjolo.com.br]
Sent: None
To: [EMAIL PROTECTED]
Subject: Re: Microsoft Access Question


Dear,

Sorry but, I've forgot to explain that I use PostgreSQL in FreeBSD box and
the Microsoft Access database in windows 98 plataform.

So, I have a script perl in FreeBSD which connect in PostgreSQL database in
FreeBSD box too and I would like that my script perl to connect to Microsoft
Access database in Windows 98 plataform to retrieve data from there and put
them in PostgreSQL database.

I load the PostgreSQL library with this "use Pg;". My script perl connects
to PostgreSQL this way:
$db = Pg::connectdb("dbname=system");

I need to do the script to open a Microsoft Access database at the same time
to retrive data from there and put them in PostgreSQL database.
Sorry, if I wasn't so clear before.

Thank you for some help.

Na Tuesday, 15 de October de 2002 ŕs 10:09:24 PM, Jenda Krynicky escreveu:

> From:                 "Cleiton L. Siqueira"
> <[EMAIL PROTECTED]>
> > I need to retrieve data from Microsoft Access database and put them in
> > a PostgreSQL database. I got to access PostgreSQL normally, but I
> > can't open a Microsoft Access database using perl. Someone knows how
> > can I do it?
>
> What do you mean "got to access PostgreSQL normally"?
> DBI+DBD::Something?
> You can do pretty much the same for Access. Just use DBD::ODBC.
>
> If that doesn't work please tell us what did you try and what did it
> do.
>
> Jenda
> ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
> When it comes to wine, women and song, wizards are allowed
> to get drunk and croon as much as they like.
>       -- Terry Pratchett in Sourcery
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



Cleiton L. Siqueira
Colégio Monjolo
[EMAIL PROTECTED]
(0xx45) 520-1915

Esta mensagem foi enviada pelo sistema MONJOLO WEBMAIL

http://www.colegiomonjolo.com.br


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to