06-02-2014 03:00 PM
Hi,
I am using Labview 2009 to store date&time to microsoft database but I am getting an error (0x80040E57) which states that the field is too small to accept the amount of data I am trying to enter. A screen shot of error message and the VI is put in attachment. Please suggest a solution for this.
Thanks
Mukunda
Solved! Go to Solution.
06-03-2014 05:03 PM
Hi Mukunda,
I looked in to the issue a bit and found that the error arises when one of your database columns is too small to contain the data you're trying to put in (see page 236 of this PDF). The data causing an issue is going to be one of the strings you're attempting to insert. I assume the one you circled in red is the one causing the problem.
I found a customer who had a very similar issue. Here's how he said he resolved this issue:
I figured out the problem. The problem as you said was in the database. The "Date" column in the database table was specified to input 9 characters only. So when I ran the program on 12/2/2011 it ran for a week until 12/9/2011 11:59 PM. So from 2nd to 9th December the total characters for the date format were 9 (if you add them up) but as soon as the date changed to 12/10/2011 at 12:00 midnight the total number of characters were 10 (more than 9) and therefore it stopped at 11:59 PM on 12/9/2011. I changed the number of characters to 10 now and its running fine.
So you may want to check your database to make sure that it's large enough to accept this date input.
Hope this helps.
Trey Keown
Applications Engineer
National Instruments
06-04-2014 06:08 PM
Hi Trey Keown,
Thanks for the response. I have made the changes as you suggested and its working fine.
Mukunda