List:MaxDB« Previous MessageNext Message »
From:Marco Paskamp Date:February 3 2004 9:01am
Subject:RE: C Precomiler: SQLDA does not contain column names after DESCR
IBE
View as plain text  
Hi Aaron,
as far as I remember getting the columnnames via a "describe fetch" command isn't
implemented. Maybe the following is a workaround.
    EXEC SQL PREPARE test FROM :a_sql_stmnt;

    EXEC SQL DESCRIBE test;

    EXEC SQL EXECUTE test;
    EXEC SQL PREPARE fetch1 FROM 'FETCH USING DESCRIPTOR';

HTH,
Marco
> -----Original Message-----
> From: Aaron Taylor [mailto:taylor@stripped]
> Sent: Montag, 2. Februar 2004 18:41
> To: maxdb@stripped
> Subject: C Precomiler: SQLDA does not contain column names after
> DESCRIBE
> 
> 
> Hi,
> 
> I'm using MaxDB 7.5.0.0.8 with SuSE 9.0.
> 
> When using the Precomopiler-Interface I have a strange problem I'm 
> afraid I wasn't able to solve.
> 
> After doing a
> 
>    EXEC SQL PREPARE test FROM :a_sql_stmnt;
>    EXEC SQL EXECUTE test;
>    EXEC SQL PREPARE fetch1 FROM 'FETCH USING DESCRIPTOR';
> 
> at last I do a
> 
>    EXEC SQL DESCRIBE fetch1;
> 
> which also works fine. I can access all the table information in
> sqlda. All data? No, while
> 
> 	sqlda.sqlvar[ii].coltype     and
> 	sqlda.sqlvar[ii].colfrac
> 
> are available and contain sensible data
> 
> 	sqlda.sqlvar[ii].colname
> 
> isn't. It just contains the string "(null)".
> 
> What am I doing wrong?
> 
> Thanks in advance,
> 
> Aaron
> 
> 
> -- 
> 
> aaron taylor
> universitaet heidelberg
> kirchhoffinstitut fuer physik, inf 227
> d-69120 heidelberg
> tel. +49-6221-54-9811
> mailto:taylor@stripped
> 
> 
> -- 
> MaxDB Discussion Mailing List
> For list archives: http://lists.mysql.com/maxdb
> To unsubscribe:    
> http://lists.mysql.com/maxdb?unsub=1
> 
Thread
C Precomiler: SQLDA does not contain column names after DESCRIBEAaron Taylor2 Feb
RE: C Precomiler: SQLDA does not contain column names after DESCRIBEMarco Paskamp3 Feb