I had this problem to but was never able to find what was causing it. The way I got around it was by doing execute statements like: connection.execute("INSERT INTO .....") That way I avoided VB handling the updates and it worked. But since Josh pointed this little problems "solution" out I might give that a try.
-Nick > Tom - > > I'll address what I can.... > > I had the same problem with fields being truncated on direct connections (the > problem does not manifest on ODBC table attaches in Access). > > IIRC, the way to "solve" this problem is to make sure the "optimize columns > widths" (option 1) in the ODBC properties. > > Hope that helps (at least a little). > > j----- k----- > > On Wednesday 28 August 2002 15:37, Tom Emerson wrote: >> But enough of the background, here is the problem: >> >> developing a visual-basic (6) application using myodbc connected to a > mysql >> database on the network. Adding records works well "the first time", > but >> after the database has closed (i.e., "the next time I run the > program"), I >> run into problems. I've tracked it down to what VB "believes" is the >> maximum field size for a given field, and it appears to be limited to >> whatever the "longest" value is in the particular field -- when a > table is >> "new" (empty), there are no entries, so VB "thinks" the fields are > "-1" in >> length (technically, "unlimited"), and the program works fine. The > next >> time the program runs, the fields "definedlength" property is set to >> whatever the "longest" value happens to be in the table (hence the > "ugly" >> workaround is to insert a "bogus" entry with spaces or some filler >> character padded out to the maximum length -- this is fine for > "master" >> [key] tables, but for detail entries it might become problematic.) >> >> I've even tried the "pad char fields to maximum" option via the ODBC > driver >> window in the control panel, but that doesn't seem to have any effect. > > -- > Joshua Kugler, Information Services Director > Associated Students of the University of Alaska Fairbanks > [EMAIL PROTECTED], 907-474-7601 > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php