
For Madi RE: Char var prob in 4gl
Mail bounced.
Quote:
> Hello,
> I have a 4GL function which creates tables dynamically. I need to prepare
> the "create table" statement. Since the table created will be huge
> the char variable which holds the create statement has to be large enough
> to hold the entire create statement. Unfortunately when i try to
> declare a character variable (globally or locally) whose size is greater
> than 32767 ,+1 for null (2^15) like
> DEFINE cr_str char(32767)
> the 'C' function generated by the c4gl has a definition
> char cr_str[102];
> (Obviously the 4gl to C generator uses a short int)
> Is there a way to overcome this without replacing the 4GL function
> with a 'C' function (since the function is complicated,which is easy to
> write in 4GL).
Have you tried a 'text' instead of a char?
Alternatively - split the statement into parts and do
PREPARE xxx FROM strg1, strg2, strg3...
cheers
j.
_____________________________________________________________________________
Jack Parker |
Hewlett Packard, BSMC Boise, Idaho, USA| Your .sig has expired, please enter
(208) 396-5388 (W) (208) 384-1623 (H) |
_____________________________________________________________________________
Any opinions expressed herein are my own and not those of my employers.
_____________________________________________________________________________