> > Hi,
> >
> > I am sure it is easy done, however I dont seem to be able to succeed to import > 255+ characters from mySQLtable.memo field into a VFP.cursor with
> >
> >
> >
lnRet=sqlstringconnect('Driver='+lcDriver+';Server='+lcServer+';Database='+lcDatabase+';User='+lcUser+';Password='+lcPassword+';Option='+lcOption)
> >
> > TEXT TO lcSQL noshow pretext 15 TEXTMERGE
> > select id,
> > CAST(Text as M) as Text,
> > CAST(lastupdate AS datetime) AS lastupdate
> > from mySql
> > ENDTEXT
> >
> > lnResult = sqlexec( lnRet, lcsql, "crsMyCursor")
> >
> >
> >
> > Anybody around to correct my syntax?
> >
> > Thanks,
> >
> > Jockey2
>
> Does MySQL know what the datatype Memo is. The SQL command goes to the MySQL ODBC
> provider. When VFP sees it's more than 255 it would automaticslly use a Memo. Try
> withouyt CAST AS Memo.
>-Anders
Hi,
The field content in the SQl table is >255.
When I import with my syntax I get only the first 255 characters and investigating the cursor shows me the field is type C with length 255
When I import with cast (myfield type M) as myField result type C with length 255
========================================================
> This works for me, no need to specify memo, fields > 255 are coverted to memo
> automagically:
>Carlos Alloatti
Hi,
Your syntax is basicly same as mine. In my case a no conversion into a VFP memo field. Only 255 characters.
I suppose there is something else definitely wrong in my approach will investigate further. This thing is driving me crazy.
Best regards,
Koen
========================================================
> hello koen,
> what is your field length in your sql table? that depends or u can use memo field > in mysql to convert it into vfp >memo. or u just increase the field length in
> mysql. or u need a new blank column in output cursor which is >memo?
> lnResult = sqlexec(lnRet,"SELECT *,SPACE(256) AS MyMemo From Your
> TableName_in_MySql","YourCursor")
>Anil
Hi,
I don’t know the exact length of the field, this can be upto 5’000 or even 50’000 or only 5. I only know I import just the 1st 255 characters the rest is disregarded.
Koen