The maximum length of a string literal in VFP is 255 characters. A string variable can have size up to 16MB.
You don't have to use variables but you'll have to split your string literals on pieces lesser or equal 255 characters.
oAdoObject.Someproperty = "select ........." + ;
"from..........." + ;
...
>Hi,
>I'm working with long char variables used as sql strings passed to an ADO object. In some cases, I found the limitation of 256 chars in the variable length ,when it happen I follow this way:
>sqlstring1="select ........."
>sqlstring2="from..........."
>sqlstring=sqlstring1+sqlstring2
>and then pass sqlstring2 to the ADO object.
>I'm searching a better way to solve this issue without show my sql code in header files or memo fields.
>It is possible?
>Thanks
>Pedro
--sb--