Re: Sybase DB Library vs Client Library API
by derby (Abbot) on May 31, 2012 at 11:38 UTC
|
DB-Library was the original client lib for Sybase. It was written in the mid-80s. CT-Lib (Open Client) was supposed to be its replacement -- one that made the api more consistent; however, CT-Lib was significantly different enough that a lot of installations never migrated to CT-Lib so DB-Lib has been kept around.
The general consensus is new work should use CT-Lib but I would recommend using which ever you're comfortable with (after being deprecated for 20 years now, I doubt the trigger will ever be pulled on DB-Lib). That being said, if you're looking to use perl and Sybase, I would recommend DBI and DBD::Sybase (which is built on top of CT-Lib) rather than any of the Sybase modules. mpeppler maintains them so if he pipes in, ignore me and listen to him.
| [reply] |
Re: Sybase DB Library vs Client Library API
by mpeppler (Vicar) on Jun 07, 2012 at 08:19 UTC
|
DB-Library is only minimally maintained - new features go into Client Library.
So don't use DB-Library for any new project - and in perl, use DBI/DBD::Sybase, not Sybase::CTlib unless you really need some of the more esoteric features that might not be available in DBI.
Michael
| [reply] |
|
Thanks for the reply Michael. I prefer DBI/DBD::Sybase as well. But, don't know the reason as to why. Could you please help to clarify why you advice using DBI over CTlib?
Thanks again.
| [reply] |
|
perl@1983:
The reason I prefer the DBI/DBD route is that you use the same interface for *any* database. Here at $work, I work with Oracle, MSSQL, SQLite and occasionally PostgreSQL. When I have to interact with a particular database, I don't have to ask myself questions like:
- OK, how do I read a result set with *this* database?
- Can I use placeholders in my query? If so, how do I do that?
- What data structure get I get my results in?
Since DBI provides a standardized interface, I can be immediately productive when I switch back to a database I use rarely, without having to reacquaint myself with a module I haven't used in a year.
Sure, there are some occasional differences between the databases, but DBI / DBD lets me ignore most of them. Occasionally, I'll need a special database-specific feature and have to read DBD::Oracle or some such. But better that than having to read documentation on all the everyday operations for selecting, inserting, updating and deleting.
That's my 1/50 of a dollar.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
| [reply] [d/l] |
|
|
| [reply] |
|
|
Re: Sybase DB Library vs Client Library API
by Ravi V (Scribe) on Nov 20, 2012 at 14:24 UTC
|
have converted some of my perl scripts to use CTlib blk instead of DBlib bcp ... but i am facing problem with memory usage(increased)... Is there any document on CTlib memory usage? ..thanks for help in advance | [reply] |
|
| [reply] |
|
thanks for reply Michael
Its seems to be implementation issue..
yet i have came across other problem now ...
for "select getdate()"
DBlib returns:-
11/28/2012 3:28:38.446 AM
CTlib returns:- CTlib does special handling for DATETIME
11/28/2012 3:28 AM
it would be great if there is some solution on perl side as this have been used on many procedures and changing all the procedure will be problem.
Thanks
| [reply] |
|
|
thanks Michael for this:- http://www.peppler.org/archive/sybperl-l/1999/9/4985.html
| [reply] |