On Tue, 2004-03-23 at 06:24, v79k wrote: > Hi, > I have successfully installed DBD::Sybase and FreeTDS > for my Perl program on Linux. > I also ran the tsql diagnostic routine and at least it > connects to the DB. > So I assume FreeTDS is ok. (I think I got the > freetds-0.61 directory.) > It is also able to find the Sybase.pm module. Cause > that error was sorted out.
> Was told 1433 is the default port number by DBA. > # falcon is the database I want to connect to. > my $dbh = > DBI->connect("DBI:Sybase:falcon:$SQLSERVER:1433",$SQLUSER,$SQLPASS) > || die ("Database connection not made: $DBI::errstr"); > > Also tried without port number, > my $dbh = > DBI->connect("DBI:Sybase:falcon:$SQLSERVER",$SQLUSER,$SQLPASS) > || die ("Database connection not made: $DBI::errstr"); Have you read the DBD::Sybase docs? Have you read the FreeTDS docs? You should have an entry in /etc/freetds.conf (or /usr/local/etc/freetds.conf) for your server (I guess that's "hawk"), which specifies the IP address (or hostname) and port of the server, and possibly the TDS protocol level. Next you use: $dbh = DBI->connect("dbi:Sybase:server=$SERVER", $user, $pwd); to connect. If you want to specify the *database* to use at connection time you can do that as well: $dbh = DBI->connect("dbi:Sybase:server=$SERVER;database=$DB", $user, $pwd); note that DBD::Sybase connection attributes (server, database, charset, etc) are separated with semi-colon ';'. Michael -- Michael Peppler Data Migrations, Inc. [EMAIL PROTECTED] http://www.peppler.org/ Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or long term contract positions - http://www.peppler.org/resume.html