Back to forum list… Back to Issues and Problems...

IMan 4.0 having issues with DB queries (9 replies)

Randy
6 years ago
Randy 6 years ago

For some reason IMan appears to be losing a value... that's as good as I can describe it.

It's a simple job with a DB reader, and then a DB writer.  There is an INT field which has a value of 1 that is populated in the IMan dataset from the DB Reader.  When I attempt to write that value to a DB table in the DB Writer, I get an error about that field being empty.

https://www.realisable.co.uk/wp-content/uploads/2018/12/mstsc_2018-12-10_08-45-34.png
https://www.realisable.co.uk/wp-content/uploads/2018/12/mstsc_2018-12-10_08-45-52.png
https://www.realisable.co.uk/wp-content/uploads/2018/12/mstsc_2018-12-10_08-44-24.png
https://www.realisable.co.uk/wp-content/uploads/2018/12/mstsc_2018-12-10_08-45-18.png
Randy
6 years ago
Randy 6 years ago

Screenshot 1: You can see us hardcoding the value of 1 into the "store_id" field.  (I tried the same without wrapping the 1 in single quotes, and I got the same error.

Screenshot 2: You can see that store_id is in the IMan dataset, and it's type is an Integer.

Screenshot 3: This is the error I am receiving when attempting to use the DB Writer.

Screenshot 4: This is the view from the DB Reader where you can see that store_id is clearly populated with "1" in each row.

Support
6 years ago
Support 6 years ago

Randy, what database are you targeting?

Randy
6 years ago
Randy 6 years ago

MySQL (mariaDB)

Support
6 years ago
Support 6 years ago

Hi Randy,

I'll test this in house, in the meantime could you retest while the general query log is active? I'd like to see the actual statement sent.

Nick

Randy
6 years ago
Randy 6 years ago

Nick,

 

What is the "general query log" and how do I enable it?

Randy
6 years ago
Randy 6 years ago

The error sent to the ErrorLog is this:

2018-12-17 00:01:34:817 - Realisable.Data.Transform.DbWriterException: An error occurred whilst inserting a record. Error - ERROR [HY000] [MySQL][ODBC 5.3(a) Driver][mysqld-5.7.24-26]Incorrect integer value: '' for column 'store_id' at row 1 ---> System.Data.Odbc.OdbcException: ERROR [HY000] [MySQL][ODBC 5.3(a) Driver][mysqld-5.7.24-26]Incorrect integer value: '' for column 'store_id' at row 1
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
at System.Data.Odbc.OdbcCommand.ExecuteScalar()
at Realisable.Utils.Data.Dialect.MySql.Insert(DbCommand cmd, String autoIdentityColumn)
at Realisable.Data.Transform.DbWriterInsertCommand.ExecuteCommand(DbConnection connnection, Transaction transaction, DbTransaction dbTransaction)
at Realisable.Data.Transform.DBIOControllerAdapter.Insert(Transaction output, EntityCommand cmd)
--- End of inner exception stack trace ---
at Realisable.Data.Transform.DBIOControllerAdapter.Insert(Transaction output, EntityCommand cmd)
at Realisable.Data.Transform.DBIOControllerAdapter.InsertUpdate(Transaction output, EntityCommand cmd)
at Realisable.Data.Transform.DBIOControllerAdapter.Realisable.Data.Transform.IOutputWriter.WriteRecord(Transaction output)
at Realisable.Data.Transform.TransformWrite.PerformTransform()
at Realisable.Data.Transform.TransformWrite.Process()
at Realisable.Data.Transform.TransformControllerInterop.Process()
An error occurred whilst inserting a record. Error - ERROR [HY000] [MySQL][ODBC 5.3(a) Driver][mysqld-5.7.24-26]Incorrect integer value: '' for column 'store_id' at row 1
Time='12/17/18 00:01:38' App='IManEngine:3.2.100' ADO-version='10.0' Computer='CZSAGE1'
Method: TransformControllerInterop.PerformTransform
Number: -2146233088 = &H80131500 = vbObjectError + 988416 = ERRMAP_APP_FIRST + 983218
Source: Realisable.Data.Transform
Description: An error occurred whilst inserting a record. Error - ERROR [HY000] [MySQL][ODBC 5.3(a) Driver][mysqld-5.7.24-26]Incorrect integer value: '' for column 'store_id' at row 1
Call Stack: TransformControllerInterop.PerformTransform() ----------------------------------------
Env: sFileStorePath='C:\IMan\Debug\CZUS1DB1DB2-OEINVHDevo-6', bPassDataAsString=False
Call Stack: TransformControllerInterop.ITransformController_Process() ----------------------------
Call Stack: TransformCoordinator.RunTransform(sTransformId='OEINVHWriter') -----------------------
Env: eTransformType=2, bWriteSummaries=False, bSummariesHandled=False
Call Stack: TransformCoordinator.RunTransformStream(sParentTransform='') -------------------------
Env: sTransformId='OEINVHWriter', l=0, m=0
Call Stack: TransformCoordinator.Process() -------------------------------------------------------
Call Stack: IntManEng.Main() ---------------------------------------------------------------------
Env: sCmd='"CZUS1DB1DB2-OEINVHDevo"'

Randy
6 years ago
Randy 6 years ago

Just noticed a few other weird things:

  • If you set the Error Action to "Reject Record" IMan returns an error of "This OdbcTransaction has completed; it is no longer usable."
  • If you tell IMan to commit the dataset as a transaction you don't get errors.... but it also doesn't work.  Additionally, in the Palette, the "store_id" field has no value in it when IMan "completes."
Randy
6 years ago
Randy 6 years ago

Well.... I got it working... by deleting and re-creating it unfortunately.

 

It looks like IMan wasn't "pushing forward" the field type assigned in a previous transform.  I did a diff between the previous and current versions of the jobs, and the only real difference was that in the non-working version the int field "store_id" was still coming through as a string for some reason.  The only other differences I see is that a few of the hashcode values were different, and the "mapto" and "sqlop" attributes were switched.

 

https://www.realisable.co.uk/wp-content/uploads/2018/12/sgdm_2018-12-18_09-10-25.png
https://www.realisable.co.uk/wp-content/uploads/2018/12/GitExtensions_2018-12-18_09-04-35.png
https://www.realisable.co.uk/wp-content/uploads/2018/12/GitExtensions_2018-12-18_09-04-21.png
Randy
6 years ago
Randy 6 years ago

I attempted to run the job again after reverting all of the changes except for the "store_id" one, and it worked.

This appears to confirm that IMan needs to make sure to "bring forward" the field types from the previous transform.  I have asked for this many times, can we PLEASE have some sort of processing between transforms that:

  • makes sure that fields exist
  • are in the same order
  • have the same type.

Contact

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Request Demo

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Access Downloads

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close