Re: SQLPLUS do, Pro*C don't

From: Joe Halpin <jhalpin_at_netcom.com>
Date: Wed, 22 Feb 1995 13:43:01 GMT
Message-ID: <jhalpinD4EM3q.10K_at_netcom.com>


In article <3if1ie$1djd_at_unixfe.rl.ac.uk> andrew_at_inf.rl.ac.uk writes:
>
>I am using the following on a SparcStation 20, Solaris 2.4
>with Sun SparcWorks 3.x C compiler:
>
>Pro*C: Release 1.5.10.1.0 - Production on Tue Feb 21 16:08:31 1995
>SQL*Plus: Release 3.1.2.3.1 - Production on Tue Feb 21 16:12:08 1995
>ORACLE7 Server Release 7.0.16.4.0 - Production
>
>I'm writing a Pro*C interface to a program to fetch items out of an
>Oracle database. When I run the program I get nothing out of the
>database.
>
>My next action was to make the program generate the SQL that one would
>type in to SQLPLUS to get back the same data. When I cut/paste this
>into SQLPLUS I get back what I expect.
>
>So what the *** is going on? I'm using the same username and password
>in the program that I use with SQLPLUS. Does the owner of the database
>I'm accessing need to set something for me to read it through a
>program? Am I missing something obvious?
>
>Thanks in advance,
>
>---
>Andrew McDermott, URL: http://www.cis.rl.ac.uk/people/andrew/contact.html
>Computing & Information Email: andrew_at_inf.rl.ac.uk
>Systems Department, Tel: +44 235 445739
>Rutherford Appleton Laboratory, FAX: +44 235 445727 or +44 235 445831
>Chilton, Didcot, OXON OX11 0QX ENGLAND
>
>

I've had some problems like that, and for me they were attributable to the fact that the precompiler didnt find sqlca.h during precompilation. If it doesn't find this file, some code doesn't get generated. Check the .c file which the precompiler produced and make sure that there C code really got generated for the ESQL in question.

I'm working with version 2.x of the precompiler, so your mileage may vary.

joe

-- 
Joe Halpin 
jhalpin_at_netcom.com 
---------------------------------------------------------------------------
Received on Wed Feb 22 1995 - 14:43:01 CET

Original text of this message