Problem With Oracle on Primos -> Using SQL Code in a C program

From: Mustang <bill_at_nx26.mik.uky.edu>
Date: Fri, 30 Apr 1993 04:45:10 GMT
Message-ID: <bill.736145110_at_mik.uky.edu>


I am trying to assign a value from an SQL table to a variable. My code looks something like this:

printf("Please Enter The Social Security Number to Search for: \n"); input_ssn = getnum(); /*** Gets a number of type integer ***/ EXEC SQL
SELECT patient_ssn
INTO :temp_ssn /*** Temporary Value to store SSN in ***/ FROM patients
WHERE patient_ssn = input_ssn;

I want to use this social security number in an array in the C progam but am finding it hard to retrieve this value from the table and assign it to a variable in the program. Any suggestions? Is this format even right or do I need to use the DEFINE ____ AS CURSOR command? Any suggestions would be GREATLY appreciated!!! Or instructor doesn't even know Oracle! That's quaint, isn't it?!?

Bill Ferring

--
  _____  __  __     __      ___________________________________________ 
 |  _  \|  ||  |   |  |    |  Confuscious Say:                         |
 |  _  <|  ||  |__ |  |__  |  Man who fart in church, sit in own pew!  |
 |_____/|__||_____||_____| |___________________________________________| 
Received on Fri Apr 30 1993 - 06:45:10 CEST

Original text of this message