On 11/23/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:

Hi Matthew,

The real problem is that there is no way to detect that we're trying to
connect to a rep server, so DBD::Sybase still tries to use teh ct_option()
calls, and to get the version of the server (via select @@version).

Obviously these errors aren't "real" errors - so I guess there are two
possible solutions.

1 - on your end, check for error 2056 and if so ignore the content of
errstr:

$dbh = DBI->connect(....);
if($dbh->err && $dbh->err != 2056) {
    print $dbh->errstr;
}

It's obviously not a clean solution, but it should work.

I will test this for my immediate problem and report back.


2 - we add a new connection attribute that tells DBD::Sybase to not call
ct_option, and to not try to get the version. Maybe something like

$dbh =
DBI->connect('dbi:Sybase:server=MSTR_REP;serverType=OS;...',
'sa', '...', ...);

where OS means OpenServer. This could then be useful when connecting to
other types of openserver apps, not just RepServer.

That makes plenty of sense to me. I suggest the default be set to ASE
if not specified and the allowed values will be
ASE - Adaptive Server Enterprise
ANY - Anywhere
IQ - IQ
OS - Open Server
RS - Replication server

because I am going to implement these in my DBI->connect wrapper.
<snip>

Reply via email to