Home » Developer & Programmer » Precompilers, OCI & OCCI » proc help?
proc help? [message #186026] Fri, 04 August 2006 15:47 Go to next message
mhenderson
Messages: 15
Registered: May 2006
Junior Member
I have a .pc (proc program) with a function that should select from the database a student's email address and put it in a variable.

This works correctly, except everytime, the first email address is blank,...I have double checked this and there is an email address for this person. Am I missing something silly?'

int getGoremalEmailAddress()
{
printf("Campus ID<%s>\n",campus_id);
login_oracle();
EXEC SQL SELECT goremal_email_address
INTO :email_address
FROM goremal
WHERE goremal_pidm = :campus_id;
email_address.arr[email_address.len] = '\0';
printf("E_MAIL<%s>\n",email_address.arr);
logout_oracle();
return 1;
}

Outputs:
Campus ID<75799>
E_MAIL<>
Campus ID<2003142>
E_MAIL<kabdull1@test.edu>
Campus ID<2241834>
E_MAIL<iabramek@test.edu>

thanks in advance


Re: proc help? [message #187737 is a reply to message #186026] Tue, 15 August 2006 05:26 Go to previous message
plsql11
Messages: 7
Registered: December 2005
Junior Member
TRy and get the value of .len for emailid and see if that is returned properly. It doesn't look like something is wrong.
Previous Topic: OCCI Datatypes
Next Topic: call obj function from OCI
Goto Forum:
  


Current Time: Thu Nov 21 10:24:04 CST 2024