|
|
sybperl-l Archive
Up Prev Next
From: "HANSON,DENNIS (HP-Roseville,ex1)" <dennis_hanson at hp dot com>
Subject: RE: Naming one's hostname for sp_who
Date: Oct 9 2001 4:43PM
I think you need to do the DBSETLHOST before the dblib->new.
Dennis
-----Original Message-----
From: David LANDGREN [mailto:dlandgre@bpinet.com]
Sent: Tuesday, October 09, 2001 9:37 AM
To: SybPerl Discussion List
Subject: Re: Naming one's hostname for sp_who
|Or add this to DBlib.xs and call before making a connection:
|
|void
|DBSETLHOST(host)
| char * host
|CODE:
|{
| DBSETLHOST(loginrec, host);
|}
|
|Put this around line 4540 of DBlib.xs (where you also have the
|definitions of DBSETLCHARSET, etc), rebuild, and then call with
|Sybase::DBlib::DBSETLHOST("my_host");
I had to s/loginrec/login/ to get it to compile (it seemed like the right
thing to do). I had version 2.12. At least I'm up to date with 2.13 now...
Anyway, I ran the following test
#! /usr/bin/perl -w
use strict;
use Sybase::DBlib;
my $db = Sybase::DBlib->new( shift, shift, 'ouessant', 'foo' );
Sybase::DBlib::DBSETLHOST( 'sybhost' );
sleep 60;
__END__
The connection shows up in sp_who, but the hostname column is still
reporting ouessant. Pity, it sounded like a good idea.
David
|