Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieve MySQL Longtext Data
Message
From
01/07/2008 08:24:21
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01327816
Message ID:
01327832
Views:
19
Hi Sergey,

You are a star - many thanks for that pointer.

To get this to work properly you must add an option to the end of the connection string.

lnHandle = SQLSTRINGCONNECT("driver=dvrname;server=srvname;uid=user;pwd=passwd;option=134217728;")

Now the returned table has a memo field for the Longtext data.

Kind Regards,
Mark Hall



>Mark,
>
>Looks like it's MySQL ODBC bug tha has been i fixed in 5.1.2. See http://bugs.mysql.com/bug.php?id=30890 for details.
>
>>
>>I have a MySQL 5 database table with a Longtext field. I have the MySQL ODBC Connector installed. I am using VFP 9 SP2.
>>
>>I have been able to populate the table from VFP using SQL pass-through.
>>
>>Now I want to retrieve the Longtext data from the table.
>>
>>lnHandle = SQLSTRINGCONNECT(......)
>>lcQuery = "SELECT id, textfield FROM textdata"
>>lnResult = SQLEXEC( lnHandle, lcQuery,'outdata)
>>
>>All works fine, EXCEPT the Longtext data is always truncated to 255 characters.
>>
>>I have seen CURSORSETPROP('mapbinary') and CURSORSETPROP('maptext') which allow me to change the type of the field created in the 'outdata' table from Char to VarChar, but it's still truncated to 255 characters.
>>
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform