Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> A question in pro*C??
I write a function to get table column infomation,
int ORA_GetColumnInfo(char *tablename)
{
sql_cursor ColumnCursor;
EXEC SQL ALLOCATE :ColumnCursor;
...
EXEC ORACLE OPTION(select_error=no); EXEC SQL SELECT CURSOR(SELECT column_name,data_type,data_length FROM all_tab_columns where table_name=:tablename) INTO :ColumnCursor FROM DUAL; EXEC ORACLEOPTION(select_error=yes); ...
}
the function raises an Access Violation error.
Howerver, when I replace :tablename using table name const string, it runs correctly.
Any help will be apprcieated.
Simrion
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Mar 01 1999 - 23:07:56 CST
![]() |
![]() |