Help, ProFORTRAN Dyn Meth 4 Inserts

From: MAX M. MAGLIARO <mmm_at_icf.hrb.com>
Date: 15 Jul 94 14:55:45 EST
Message-ID: <1994Jul15.145545.21565_at_icf.hrb.com>


I am running ORACLE 7.0.13 on an Alpha/AXP 3500. I need some help using dynamic SQL method 4 from ProFORTRAN.

I haven't seen a FAQ for this newsgroup, so if there is one and I could have found these answers there, I apologize.

  1. I created an application in ProFORTRAN that uses dynamic SQL method 4 to do queries. I followed the examples in the ORACLE Guide To Precompilers, and the in the ProFORTRAN supplement. It works fine.

   Now, I want to extend it to do inserts. Again, I followed an    example at the back of the supplement book (it SAYS it is an    example that does DELETEs, but that is clearly wrong. it actually    does INSERTs).

2) My problems:

       A - My bind descriptor is named BND.  After precompiling, my
           FORTRAN compiler complains that BND is an undefined
           variable (I always use the IMPLICIT NONE in my FORTRAN).
           The FORTRAN generated by ProFORTRAN uses BND only once,
           to get its address with the %REF(BND) call.  


. Is this a bug in ProFORTRAN?
. Does ORACLE assume that the BND will be implicitly declared,
so I can't use the IMPLICIT NONE statement?
. I assume that BND is simply a placeholder for the address
of the bind descriptor. If I declare it as an INTEGER to make the error go away, will this work? B - If I take out the IMPLICIT NONE so I can run the code, I try to execute the following INSERT: 'INSERT INTO FRED (A, B) VALUES (10,10)' The FRED table only has columns A and B. I get an ORA-1019 - "missing mandatory parameter". What am I missing? I do a PREPARE of the statement into S. I declare a bind descriptor, BND, for S. I fill in the addresses, lengths, and types of any bound variables into the BND descriptor (although in the above case, there are no bound vars). I use an EXEC SQL EXECUTE... to execute the statement. Do I need a SELECT descriptor as well (as I did for a query)? What for? The book example does not show this.

ORACLE support, as usual, will take until Labor Day to respond to my questions, so I appeal to the net.

Many, many thanks in advance.

-- 
Max Magliaro
MMM_at_ICF.HRB.COM
Philipsburg, Pennsylvania

"He may look like an idiot, and he may sound like an idiot, but don't
 let him fool you.  He really is an idiot." --- Groucho Marx
Received on Fri Jul 15 1994 - 21:55:45 CEST

Original text of this message