Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Wierd problem? Does C pad a host variable in embedded SQL with spaces?
I am using C on a Sun Unix Enterprise Server with embedded sql.
A select statement is used as follows
select laborcode, craft fro labor into :laborcode, craft when la2 =
:empnum
Then an
insert into labtrans (laborcode, craft) values (:laborocode, :craft);
:laborcode is defined as char laborcode[17] in the program;
The laborcode field in the labor table is a variable (VAR_CHAR) field in Oracle of up to 16 characters.
The problem is that the resulting laborcode in labtrans is always 16 characters long. If the selected laborcode from labor is less (i.e. JEDRF) then it padds the field with spaces to equal 16 characters. Is this a function of the embedded sql in C? Or of Oracle
Please respond to ramdan_at_mailexcite.com Received on Tue Apr 07 1998 - 00:00:00 CDT
![]() |
![]() |