Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database Error 1406 Cannot insert bank transaction
07-20-2017, 05:57 AM
Post: #1
Database Error 1406 Cannot insert bank transaction
Running 4.13.1

My host had a kernel update and now I have to weed out bugs.

When I try to do a Counter Sale, the following error shows:

SUCCESS Report : Order Number 13946 has been entered
Database Error 1406 : Cannot insert a bank transaction
Data too long for column 'ref' at row 1
Database Rollback Due to Error Above : Rolling Back Transaction OK
Find all posts by this user
Quote this message in a reply
07-20-2017, 06:15 AM
Post: #2
RE: Database Error 1406 Cannot insert bank transaction
Line 1973 should be changed to read:

'" . mb_substr($_SESSION['Items'.$identifier]->LocationName . ' ' . _('Counter Sale') . ' ' . $InvoiceNo, 0, 50) . "',

You appear to have fallen foul of the sql_mode (https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html) issue that I have banged on about for many years. Mysql can run in many different modes that are more or less tolerant of different issues and your hosting company seem to have been a bit naughty in changing mode on you without warning.

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
07-20-2017, 06:38 AM
Post: #3
RE: Database Error 1406 Cannot insert bank transaction
I changed line 1973 of CounterSales.php and that seems to have corrected that error. Thank you.
Find all posts by this user
Quote this message in a reply
08-07-2017, 12:19 AM
Post: #4
RE: Database Error 1406 Cannot insert bank transaction
This fix still hasn't been applied to SVN

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
08-11-2017, 11:02 AM
Post: #5
RE: Database Error 1406 Cannot insert bank transaction
Tim's change committed to SVN: revision 7813
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)