[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] database connectivity....at last!


Some instructions for getting DBI::ProxyServer and DBD::Proxy working on a
mac, it turned out to be quite simple in the end...

Linux machine:

ASE v11.0.3.3 for Redhat Linux release 5.2 Kernel 2.0.36
perl v 5.005_03
DBI v1.08
DBD::Sybase.pm (in this case, but i would imagine it will work with other

start the ProxyServer using

perl /usr/bin/dbiproxy -debug -localport=12000

Mac machine:

MacPerl v5.2.0r4
DBI v1.08 ported for the mac by Chris Nandor
RPC/PlRPC v0.2010 from CPAN
Net/NetDaemon v0.20 from CPAN

and the following script works for me....


#! perl -w

use strict;
use DBI;

my $dsn =

my $dbh = DBI->connect($dsn, 'user', 'passwd') or die $DBI::errstr;

my $sth = $dbh->prepare( 'select * from mytable' );






one word of warning, i found on one occasion an error in my database server
occured which meant i had to restart the server.... (basically a syntax
error in the SQL statement prepared, caused by a typo) but i haven't been
able to reproduce this, so just be careful when using this initially...? at
the time i was using DBI v1.06 on the linux box, i have now upgraded to
v1.08.. but i have no idea if this has fixed it, as i have not seen the
error since.


===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org