You must close the round brackets! 
And if the 200th or the 201st Char is a blank, you will loose it.

    INSERT INTO MYFILE (cMemo) VALUES (MYCURSOR.cMemo)
        *This works, but the following does not!
     lcSql="INSERT INTO MYFIE (cMemo) VALUES ("
     lcSql=lcSql+"["
     lcSql=lcSql+ALLTRIM(SUBSTR(MYCURSOR.cMemo,1,200))
     lcSql=lcSql+ALLTRIM(SUBSTR(MYCURSOR.cMemo,201))
     lcSql=lcSql+"])"
     EXECSCRIPT(lcSql)

Jörg Arand MD
assistant medical director
Neonatology
Children's Hospital
University Tübingen
Calwer Str. 7
D-72076 Tübingen
Tel.+49-(0)7071-2982211 
Tel.+49-(0)7071-2980895 (office) 
E-mail:Joerg.Arand(AT)med.uni-tuebingen.de





> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Ajit Abraham
> Sent: Thursday, February 28, 2008 11:24 AM
> To: [EMAIL PROTECTED]
> Subject: Re: 255 Limit
> 
> 
> Hi Dave,
> Thanks for your reply,
> 
> > NOTE:
> > You have to be sure that the fields passed into the ExecScript are 
> > private not local for visibility purposes.
> 
>    I cannot use variables in the lcSql. I have to empty the 
> contents of 
> the variables into the lcSql. I am using AndyKramek's data classes to 
> pass data back to backend. Currently, my backend is VFP, but I try to 
> build the lcSql so that it will be useful for a true  
> Client-Server in 
> future.
> 
>    For this, I am building the lcSql statement in such a way, that it 
> will execute if I simply do a &lcSql (or EXECSCRIPT(lcSql)) and  a 
> SQLEXEC for a true backend.
> 
>    Here is another example
>    There a editbox in a form which is bound to a temporary cursor's 
> cMemo field. The content of this editbox is 300 characters.
>    In the Save method,
>      INSERT INTO MYFILE (cMemo) VALUES (MYCURSOR.cMemo)
>       *This works, but the following does not!
>      lcSql="INSERT INTO MYFIE (cMemo) VALUES ("
>      lcSql=lcSql+"["
>      lcSql=lcSql+ALLTRIM(SUBSTR(MYCURSOR.cMemo,1,200))
>      lcSql=lcSql+ALLTRIM(SUBSTR(MYCURSOR.cMemo,201))
>      lcSql=lcSql+"]"
>      EXECSCRIPT(lcSql)
>       *This fails. If the content of the memo field is less than 255 
> characters, then it works.
> 
> I tried to MySql backend using SQLEXEC(lnConn,lcSql)
> This failed again because the entire lcSql was truncated to 255 
> characters. But the solution was cut the lcSql in smaller pieces and 
> then concatenate with a + sign and eventually use 
> SQLEXEC(lnConn,EVALUATE(lcSql)) which worked.
> 
> So in short, how do you update a VFP table's memo field with INSERT 
> statement which has a literal value greater than 255 characters.
> 
> Thanks for your patience
> 
> _Ajit Abraham
> 
> 
> __________________________________________________
> D O T E A S Y - "Join the web hosting revolution!"
>              http://www.doteasy.com
> 
> 
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to