[freetds] changing database- newbie question

Dan Wierenga dan at hornytoad.com
Wed Jul 21 15:51:47 EDT 2004


AFAIK, the usual way to set the DB in a Perl script is via the DBI->connect method:

my $dbh =  DBI->connect("dbi:Sybase:server=MyServerName;database=MyDBName", 
'username', 'password');

MyServerName is a server entry defined in the freetds.conf file.

Bort, Paul wrote:
> I never did get the configuration for this right, so I forced it. All of my
> Perl scripts that use FreeTDS start with this:
> 
>   $dbihandle->do( "use $dbname;" );
> 
> It's probably not the right way, but it works.
> 
> 
> 
> 
>>-----Original Message-----
>>From: Nicki Handy [mailto:nhandy at assumption.edu]
>>Sent: Wednesday, July 21, 2004 3:26 PM
>>To: freetds at lists.ibiblio.org
>>Subject: [freetds] changing database- newbie question
>>
>>
>>Hi- I've got everything running - dbd, dbi for sybase etc. 
>>But I know along
>>the way I set the database somewhere and I can't remember 
>>where I did it. I
>>tried to just edit the odbc.ini file to the database I want 
>>to be hitting
>>but that's not working- still hitting the old one. I'm 
>>thinking during the
>>dbi installation I set the database and user name and 
>>password and I'm not
>>sure what it does with that info but where ever it goes I 
>>need to change it.
>>Any ideas?
>>Thanks so much,
>>Nicki
>>
>>
>>_______________________________________________
>>FreeTDS mailing list
>>FreeTDS at lists.ibiblio.org
>>http://lists.ibiblio.org/mailman/listinfo/freetds
>>
> 
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
> 

-- 
Dan Wierenga
IT Manager
HornyToad Inc.
mailto:dan at hornytoad.com



More information about the FreeTDS mailing list