Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 27, 2013 02:13 PM by Lannie
Jan 17, 2013 11:26 AM|LINK
I'm facing the following problem :
I use a ODBC connector to Oracle 11g, which run wells, except for this request :
query.CommandText = "SELECT DBMS_METADATA.GET_DDL('TABLE','TABLE_NAME','USERNAME') FROM DUAL";
OdbcDataReader reader = query.ExecuteReader();
I got an exception, but it's void (no error code, no internal error, no message). The same request run wells in Toad / SQL Developer.
Thanks for any help !
Jan 27, 2013 04:20 AM|LINK
I got an exception
Jan 27, 2013 02:13 PM|LINK
You have to use Oracle Parameters and Bind Variables to pass the values for TABLE_NAME and SCHEMA as these are dynamic. 'TABLE' is a constant and can be passed as is. USERNAME is not valid, although some people exchange this term for SCHEMA... SCHEMA being
a collection of Oracle database objects which are owned by the schema name...aka user.