Patch to DBD::Oracle 1.23

Jan Mach <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <C73BE416.9D69%[email protected]>
We have published len_char_size property of statement handle. Why? That's
because of nvarchar type.

You have column nvarchar(20) and you get length 40 using PRECISION (it's
right because is BYTE length). But we need for our application CHAR length
and it's done usign len_char_size.


Regards,

Jan Mach
DERS s.r.o.
DBD-Oracle-1.23.ders.patch (application/octet-stream, 1 KB)
diff -r -u DBD-Oracle-1.23/dbdimp.c DBD-Oracle-1.23.ders/dbdimp.c
--- DBD-Oracle-1.23/dbdimp.c	2009-04-29 17:04:24.000000000 +0200
+++ DBD-Oracle-1.23.ders/dbdimp.c	2009-12-01 17:56:15.000000000 +0100
@@ -3919,7 +3919,13 @@
 		retsv = newRV(sv_2mortal((SV*)av));
 		while(--i >= 0)
 			av_store(av, i, boolSV(imp_sth->fbh[i].nullok));
-	}
+	} 
+	else if (kl==13 && strEQ(key, "len_char_size")) {                                                                                               
+	        AV *av = newAV();                                                                                                                             
+	        retsv = newRV(sv_2mortal((SV*)av));                                                                                                           
+	        while(--i >= 0)                                                                                                                               
+		        av_store(av, i, newSViv(imp_sth->fbh[i].len_char_size));
+	}	
 	else {
 		return Nullsv;
 	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.