473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Pro*C and nested tables compiler error

Hello,

I'm attempting to use Pro*C to create a nested table and send that data
to a stored procedure as a parameter. However, I'm getting a Pro*C compiler
error that I'll describe below. I'm using Oracle 10.2 on Unix.

1. First I created a nested table type in the database:

CREATE TYPE varchar2_list AS TABLE OF VARCHAR2(15);
2. Then I created the input file for "ott", called "acttest.typ":

CASE=LOWER
TYPE activity.varchar2_list

3. Next I used "ott" to generate the header file needed in my .pc file:

ott userid=[user]/[pass]@[tns_name] intype=acttest.typ outtype=out.typ code=c hfile=acttype.h

This command was successful.

4. Then I attempted to declare a variable of type "varchar2_list" in my source file, "acttest.pc":

#include <sqlca.h>
#include "acttype.h"
...
EXEC SQL BEGIN DECLARE SECTION;
...
varchar2_list *vclProductCodeList;
...
EXEC SQL END DECLARE SECTION;

When I compile with "proc", I get the following compiler error:

Syntax error at line 894, column 7, file acttest.pc:
Error at line 894, column 7 in file acttest.pc
varchar2_list *vclProductCodeList;
......1
PCC-S-02201, Encountered the symbol "varchar2_list" when expecting one of the fo
llowing:

auto, char, const, double, enum, extern, float, int, long,
ulong_varchar, OCIBFileLocator OCIBlobLocator,
OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
short, signed, sql_context, sql_cursor, static, struct,
typedef, union, unsigned, utext, uvarchar, varchar, void,
volatile, a typedef name, a precompiled header, exec oracle,
exec oracle begin, exec, exec sql, exec sql begin,
exec sql end, exec sql type, exec sql var, exec sql include,
The symbol "enum," was substituted for "varchar2_list" to continue.

Why can't Pro*C recognize my new "varchar2_list" type? Does it matter if the DB user used in the Pro*C application doesn't own the nested table object? I have included my command line:

proc code=cpp sys_include='(/opt/SUNWspro/prod/include/CC,/opt/SUNWspro/prod/include/CC4,/usr/include,/u01/app/oracle/product/10.2.0/rdbms/public,.)' sqlcheck=semantics userid=[user]/[password]@[tns] include='(/u01/app/oracle/product/10.2.0/rdbms/public,.)' intype=out.typ acttest.pc

Thanks in advance for any helpful information.
Jun 19 '07 #1
0 1498

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Robert M. Gary | last post by:
I'm curious what the ANSI C++ standard says about nested classes. I'm not able to find where in the ANSI C++ standard this is addressed. The issue is the accessibility of sibling nested classes....
8
by: CoolPint | last post by:
I read in books that nested class cannot access private members of nesting class and vice versa unless they are made friends. Somehow, my compiler is letting my nested class member functions access...
10
by: nimmi_srivastav | last post by:
Below you will see an example of a nested conditional expression that this colleague of mine loves. He claims that it is more efficient that a multi-level if-else-if structure. Moreover, our...
3
by: Luis Diego Fallas | last post by:
Hi everyone , I'm having a problem when trying to compile code that contains the following pattern: using System; public class A { public class B : Inn.C { }
17
by: Peter Olcott | last post by:
http://www.tommti-systems.de/go.html?http://www.tommti-systems.de/main-Dateien/reviews/languages/benchmarks.html Why is C# 500% slower than C++ on Nested Loops ??? Will this problem be solved in...
1
by: Thu | last post by:
Hi, I create a Dataset to link three tables in my Access database. E.g. The three tables are , , . I then create 2 DataRelations, 1st relation (Order_Cust_Rel) links and using CustomerID field...
4
by: rach | last post by:
I just started to learn C++. I copied the following code from a data structure textbook to a ".h" file and couldn't compile it. The code contains three template interfaces. One inherits another. The...
0
by: rupalirane07 | last post by:
Both grids displays fine. But the problem is only parent datagrid sorting works fine but when i clik on child datagrid for sorting it gives me error: NullReferenceException error Any...
3
by: jdurancomas | last post by:
Dear all, I'm trying to declare the operator++ to a nested class. The nested class is not template but the container it is. The code used in teh sample program is included bellow: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.