Might be. I just tried q163800 and it doesn't produce error. I even added more providing the sixth field. I also tested it under VFP6 and VFP5. Both succeeded (SQLserver 2000 but I don't think as the source of problem).
Te only thing I changed in sample was breaking the continuation lines. ie: In sample it was :
b=SQLEXEC(handle, "INSERT INTO t255 (one,two,three,four,five) ;
VALUES('abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', + ;
'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', + ;
'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', + ;
'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', + ;
'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw')")
b=SQLEXEC(lnhandle, "INSERT INTO t2551 (one,two,three,four,five,six) " +;
"VALUES('abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', "+;
"'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', "+ ;
"'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', "+ ;
"'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', "+ ;
"'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', "+ ;
"'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw')")
Didn't try the other way.
Cetin
>I think Luis is trying to update/insert a long text into memofield and there's limit of 255 characters for string literal.
>
>>I don't know too. I send very long ones, they select, execute, create proc etc and all works (VFP6 SP5). Might there be a fix because I learned it can happen reading Q163800. I never experienced it on either VFP or SQL server sources.
>>Cetin
>>
>>>I wonder how this 255 char max really works. I have sent twice as much more than than and never had any problems
>>>
>>>I use :
>>>
>>>lOra="SELECT..............."
>>>lOra=lOra +"FROM ........................"
>>>lnResult=SQLEXEC(lnHandle,lOra,'TABLE1')
>>>
>>>
>>>>>Hello Everybody!
>>>>>I am using SQL pass through to update and insert records in a SQL Server 7.0 database. I build a SQL string and then I do something like :
>>>>>
>>>>>lnResult=SQLEXEC(lnHandler,lcMySQLString,"CursorName")
>>>>>
>>>>>but is not executing because my lcMySQLString is more than 255 characters, what to do ?
>>>>>
>>>>>=THIS.Thanks("in advance")
>>>>
>>>>Luis,
>>>>Maybe it's something else. I send very long strings to SQL server and works.
>>>>Cetin