Re: how to get datatype of columns of a table in perl script
- From: kevindotcar@xxxxxxxxx (Kevin Carothers)
- Date: Thu, 14 Apr 2005 11:57:50 -0700
On 4/14/05, Darren Duncan <darren@xxxxxxxxxxxxxxxx> wrote:
> At 7:38 PM +0530 4/14/05, Vamsi_Doddapaneni wrote:
> >Hi all
> >I am new to perl just (1 1/2 month experience.). I am developing perl script
> >which connects to oracle database and selects rows from a (x) table and then
>
> A simple generic solution is to just quote all literal values,
> regardless of the data type. Any database should be able to handle
> this regardless of the data type.
Assuming you have a group of rcds called tth;
$nbrFlds = $tth->{NUM_OF_FIELDS}; ### returns the # of fields
for ($ixx=0; $ixx < $nbrFlds ; $ixx++) {
$xname = $tth->{NAME}->[$ixx]; ### returns the field name
}
Caveat,
This might be dependent on the drivers you use;
But I know this code works for Access.
HTH-
kevdot
.
- References:
- how to get datatype of columns of a table in perl script
- From: Vamsi_Doddapaneni
- how to get datatype of columns of a table in perl script
- Prev by Date: RE: how to get datatype of columns of a table in perl script
- Next by Date: Calling Stored Procedure using REF CURSORS
- Previous by thread: Re: how to get datatype of columns of a table in perl script
- Next by thread: Re: how to get datatype of columns of a table in perl script
- Index(es):
Relevant Pages
|