PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: michael dot peppler at bnpparibas dot com
Subject: Re: Migrating from DBLib to CTLib
Date: Jan 10 2006 7:21AM

DBlib is definitely deprecated, and doesn't have support for a number of
new features that have been added at the protocol level (date and time
variables, wide varchar columns, etc).

It shouldn't be TOO hard to write a DBlib to CTlib map if the number of
DBlib routiunes that are used is relatively small.

For example dbcmd() can be written like this:

sub dbcmd {
    my $handle = shift;
    my $sql = shift;

    $handle->{__SQL} .= $sql;
}

and dbexecute():

sub dbexecute {
    my $handle = shift;

    my $ret = $handle->ct_execute($handle->{__SQL});
    # clear the _SQL buffer
    $handle->{__SQL} = '';

    return $ret;
}

etc.

Of course I haven't seen your higher-level code, so maybe there's an
alternative method that can be used (i.e. re-write the middle layer to use
CTlib instead)

In the meantime I'll try to find the info regarding the .a libs under
Cygwin for DBlib...

Michael




Internet
mark@aufflick.com@peppler.org - 10/01/2006 07:10


Sent by:    owner-sybperl-l@peppler.org

To:    sybperl-l

cc:


Subject:    Migrating from DBLib to CTLib



As per another email thread (about Sybperl on cygwin), it seems that our
legacy code uses DBLib. In fact it inherits from Sybase::DBLib which
doesn't seem like the best way to go (I would be inclined to use a
has-a model rather than an is-a model in this case).

I believe from other posts that DBLib is somewhat deprecated. Can anyone
comment on that, and does anyone have any suggestions for migrating from
DBLib to CTLib?

Cheers,

 Mark.



This message and any attachments (the "message") is
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and 
immediately notify the sender. Any use not in accord with 
its purpose, any dissemination or disclosure, either whole 
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message. 
BNP PARIBAS (and its subsidiaries) shall (will) not 
therefore be liable for the message if modified. 

                ---------------------------------------------

Ce message et toutes les pieces jointes (ci-apres le 
"message") sont etablis a l'intention exclusive de ses 
destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le detruire et d'en avertir 
immediatement l'expediteur. Toute utilisation de ce 
message non conforme a sa destination, toute diffusion 
ou toute publication, totale ou partielle, est interdite, sauf 
autorisation expresse. L'internet ne permettant pas 
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce 
message, dans l'hypothese ou il aurait ete modifie.