RE: column display widths reported incorrectly, columns truncated on insert
"Eric Lommatsch" <[email protected]> Wed, 10 Mar 2010 16:11:10 -0700
| Newsgroups | gmane.comp.db.mysql.odbc |
|---|---|
| Message-ID | <D3AECE42B36FF4499B79BC36BFD48C31028486B5@micronix-sbe.MICRONixInc.office> |
Hello Brandon, I have run into this situation with some of the ODBC connections I have created in the past. Make sure that the option for "Don't Optimize Column widths" is unchecked. Otherwise it will optimize the column to the first few records in the table. Thank you Eric H. Lommatsch Programmer 360 Business 2087 South Grant Street Denver, CO 80210 Tel 303-777-8939 Ext 23 Fax 888-282-9927 [email protected] -----Original Message----- From: Brandon Valentine [mailto:[email protected]] Sent: Wednesday, March 10, 2010 3:05 PM To: [email protected] Subject: column display widths reported incorrectly, columns truncated on insert Greetings, I'm trying to use MyODBC to connect the UPS Worldship 2010 desktop application to a MySQL 5.1.44 server. I am able to connect to the server just fine, but when browsing the database the column display widths show up incorrectly. For instance, a column defined in MySQL as an int(11) shows up as an int(4). In fact, all integer columns seem to be showing up as int(4). When the Worldship app tries to insert into a table through MyODBC it appears to be truncating the fields to the display width being reported for that column. The inserts are failing because I have a foreign key constraint on one of the columns that catches the truncated ID and doesn't permit the insert. What I would like is to understand why the MyODBC driver is misreporting the column widths and what might be done to present the correct column widths to the application. I have tried the same operation using MyODBC 3.51.27 as well as 5.01.06.00 and both have the same problem. I have collected the myodbc.log, the output I get from Worldship, and the MySQL describe output about the table I'm attempting to insert into: http://gist.github.com/328478 Thanks, Brandon -- Brandon D. Valentine http://www.brandonvalentine.com -- MySQL ODBC Mailing List For list archives: http://lists.mysql.com/myodbc To unsubscribe: http://lists.mysql.com/[email protected] -- MySQL ODBC Mailing List For list archives: http://lists.mysql.com/myodbc To unsubscribe: http://lists.mysql.com/[email protected]