Gary,
Once again, you don't need macro substitution. By using macro substitution this way you conver string to string literal which lenght is limited to 255 characters.
=sqlexec(nHandle, sqlselect,'info')
>I am using sql pass-through for remote access to a sybase database.
>
>My select statements are developed by storing the statement to a variable and passing this variable to the sqlexec statement with macro substitution.
>
>i.e.
>sqlkey="1"
>sqlselect="Select * from loan_information for loan_id="+sqlkey"
>=sqlexec('&sqlselect','info')
>
>
>This seems to work fine until my select statement gets longer than 254 characters. (the max lingth of a string.
>
>Does anyone have an idea or an example of a long select statement using sql pass-through.
>
>Thanks
--sb--