Re: How to do the equivalent of 'describe' with a SELECT?
- From: sybrandb@xxxxxxxxx
- Date: Sat, 31 Mar 2007 19:05:56 +0200
On 31 Mar 2007 07:50:06 -0700, "Ramon F Herrera" <ramon@xxxxxxxxxxx>
wrote:
The SQL code that I need is for a Pro*C/C++ application. Before my
compiled C program does its main thing, it should check the current
sizes of the variables in the target table.
Why, do you think you can dynamically change the change of variables
of a *compiled* program? That would be very weird.
I would like to be able to change the variables' sizes, for instance,
from:
VARCHAR(20);
to
VARCHAR(30);
without having to recompile all my C programs. Or at least, reduce the
impact of such resize.
TIA,
-Ramon
In PL/SQL you would declare the variable as
<variable> <table>.<column>%type
but you would still need to recompile everything (automagically).
May be something similar exists in Pro*C.
Apart from that your task is impossible: you simply can't change
dynamically the limits of *statically* declared variables, or you
would need pointer variables everywhere.
Such is the fate of a developer hardcoding everything and not using
constants.
--
Sybrand Bakker
Senior Oracle DBA
.
- Follow-Ups:
- Re: How to do the equivalent of 'describe' with a SELECT?
- From: Ramon F Herrera
- Re: How to do the equivalent of 'describe' with a SELECT?
- References:
- How to do the equivalent of 'describe' with a SELECT?
- From: Ramon F Herrera
- How to do the equivalent of 'describe' with a SELECT?
- Prev by Date: Re: rman rman-04015 charaset problem
- Next by Date: how to dynamically switch accessing a table from one db to another
- Previous by thread: How to do the equivalent of 'describe' with a SELECT?
- Next by thread: Re: How to do the equivalent of 'describe' with a SELECT?
- Index(es):