DBD::Sybase prepare() with placeholders fails with ASE 11.0.x
From: Michael Peppler (mpeppler_at_peppler.org)
To: Sybperl-L Mailing List <firstname.lastname@example.org>, email@example.com Date: Fri, 19 Dec 2003 08:35:10 -0800
I've just discovered that DBD::Sybase 1.01 prepare() call with
placeholders will fail with
ct_result(ct_dynamic(CS_PREPARE)) returned -205 at
DBD::Sybase::db prepare failed: Server message number=193 severity=15
state=4 line=1 text=The object or column name starting with '' is too
long. The maximum length is 10 characters.
when connected to an 22.214.171.124 server (in my case the free 126.96.36.199
release for linux).
The reason is that in 1.01 I increased the length of the identifier used
when creating the temporary stored proc/dynamic statement, and that
identifier now exceeds the max limit of 10 characters that 188.8.131.52 has.
A fix will be in 1.02, but in the meantime you can fix it by changing:
sprintf(imp_sth->dyn_id, "DBD%d_%x", getpid(), (int)tt++);
sprintf(imp_sth->dyn_id, "DBD_%x", (int)tt++);
around line 1990 of dbdimp.c and rebuilding.
-- Michael Peppler Data Migrations, Inc. firstname.lastname@example.org http://www.mbay.net/~mpeppler Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or long term contract positions - http://www.mbay.net/~mpeppler/resume.html