I did that... it makes no difference. The sql text command is longer than 255 characters therefore it is getting truncated on the last Left Join line.
I've tried splitting it into 3 sections using the old method of Select.... from .... where..... and passing the 3 portions to the adapter via the properties. That fails also. I'm at a complete loss, since I'm just learning ca's.
Thanks for your input.
>Remove the semi-colons from your TEXT...ENDTEXT code.
>
>>In the following code, the sql statement keeps getting chopped before the end. I have tried everything I can think of, iincluding stringing it all together and removing the aliases. It sill is to long. Can anybody offer any suggestions on getting this sql statement into the cursor adapter so that it will fill the cursor.
>>
>>I am also using Mark McCasland's cabuilder program. It is a wonderful tool. Thanks Mark.
>>
>>
>>
>>******************************************
>>**--GetSQL Method
>>LOCAL lcText
>>
>>TEXT TO lcText NOSHOW PRETEXT 7
>> SELECT DISTINCT st.abbr, st.name, ea.state_id, st.default ;
>> FROM table1 t1;
>> LEFT JOIN table2 t2 ON t2.record_id = t1.record_id ;
>> LEFT JOIN table3 t3 ON t3.record_id = t2.record_id ;
>> LEFT JOIN table4 t4 ON t4.record_id = t3.record_id ;
>> LEFT JOIN states st ON st.record_id = t4.state_id
>>ENDTEXT
>>RETURN ALLTRIM(lcText)
>>
>>