Re: A Pro*C question..

From: Vasudev V. Yendapally <vasudevy_at_eng.auburn.edu>
Date: Fri, 23 Dec 1994 20:42:39 GMT
Message-ID: <D1A6v3.BFx_at_mail.auburn.edu>


 

In article HBy_at_mail.auburn.edu, vasudevy_at_eng.auburn.edu (Vasudev V. Yendapally) writes:
>Hi,
> I'm trying to "describe" a given table and get the
>table attributes into some variable names. I'm able to
>execute any statements that involve "SELECT, INSERT, UPDATE,
>DELETE " but when it comes to "describe tablename" no
>action is performed and I simply exit the program.
>Can someone explain me how I can get these variables to
>be stored and can be displayed (using Pro*c ofcourse!)?
>
>Please send any of your replies to my E-Mail address :
>
>vasudevy_at_eng.auburn.edu
>
>Thanks for your time.
>
>Vasu/..
>
>
>---
>**************************** *********************************
> Vasudev Yendapally 333 EastMagnolia Ave # 3
> Dept. of Computer Science Auburn AL - 36830
> Auburn University Phone (205)-821-3501
>**************************** *********************************
>

Thanks to everyone who promply replied to my question. I got it working.

The methods that were suggested were.

  1. Fire off a sqlplus script that spools the desc statement to a file, then open and read the file into your variables.
  2. define a cursor to select rows from user_tab_columns and organized the returned values into your variables.

Thanks again
Vasu/..

---
****************************           *********************************
 Vasudev Yendapally                      333 EastMagnolia Ave # 3  
 Dept. of Computer Science               Auburn AL - 36830          
 Auburn University                       Phone   (205)-821-3501     
****************************           *********************************
Received on Fri Dec 23 1994 - 21:42:39 CET

Original text of this message