Re: Length of a LONG-Type in PRO*C

From: JEFF CHAMBLEE <chamblej_at_author.gsfc.nasa.gov>
Date: 23 Jul 1993 14:18 -0500
Message-ID: <23JUL199314180900_at_author.gsfc.nasa.gov>


In article <1993Jul23.123922_at_ap.mchp.sni.de>, krojer_at_ap.mchp.sni.de (Franz Krojer) writes...
>Know's annybody a way to get the actual length
>of a LONG datafield before a SELECT or FETCH is made?
>
>Thanks
>
>--
>Franz Krojer, SNI AP 154
>Otto-Hahn-Ring 6, D-8000 Muenchen 83, Germany
>email: franz.krojer_at_ap.mchp.sni.de
>

Learning to use longs is like walking through a mine field. You just got half your foot blown off.

Pro*C does not allow VARCHARs greater than 64KB. So what I did was to add a bytes column to my table, and count the bytes as I read data with my program to load long data.

I'd be happy to share my LOAD_TXT and UNLOAD_TXT programs with anyone who asks for copies. LOAD_TXT will read a text file and insert it into a long, and UNLOAD_TXT will read a long and create a text file. These are not dynamic Pro*C, so you will have to replace my table structure with your own, but that's easy.


Jeff Chamblee			      	"I'm not very smart, but 	
Computer Sciences Corp. 	      	I can lift heavy things."
Laurel, MD 20707 USA Received on Fri Jul 23 1993 - 21:18:10 CEST

Original text of this message