Workflow and ServiceDesk Community

 View Only
  • 1.  Workflow and MySQL timestamp

    Posted May 28, 2013 11:18 AM

    Hi All,

     

    I have been trying to get this working for days no and can't find anything specific to workflow on the internet about it.

     

    I have a MySQL DB which connects to Workflow when going to read all records it comes back with "unable to convert mysql date/time value to system.datetime".  The generator I created works fine if I don't select that field.  I seen something online about its because of NULL entrys in the field but I don't have any NULL entrys.

    I have tried any and all combination of the tick boxes in the table generator to get it working ( ie user quotes, can be null) as well as changing the provider type.  

    I don't know enough to start looking around the source code so hoping someone here might be able to help.

     

    The full error I get back from debuging is:

     

     

    ErrorMessage = "Unable to convert MySQL date/time value to System.DateTime"
    LastComponent = "Read All Records From ITSM_ Estate"
    ModelID = "72d43934-bbb9-11e2-b69f-00163504c83e"
    StackTrace = "   at GeneratedComponents.ITSM_Estate.ReadAllRecordsFromITSM_Estate.Run(IData data)
       at LogicBase.Core.ExecutionEngine.MultiPathProcessComponentExecutionDelegate.Execute(IData data, IOrchestrationComponent comp, String& outputPath, IExecutionEngine engine, TLExecutionContext context)
       at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunComponent(TLExecutionContext context, IData data, IOrchestrationComponent comp)"
    ThisFormData = 
    userid = "wil49291"
    UsersRetrievedData = array
    [0] Type: UsersObject
     
    Thanks in advance
    James


  • 2.  RE: Workflow and MySQL timestamp

    Broadcom Employee
    Posted May 28, 2013 11:26 AM

    In the connection string for the MySQL database make sure to specify the options 'Convert Zero DateTime=True' & 'Allow Zero DateTime=True'.



  • 3.  RE: Workflow and MySQL timestamp

    Posted May 29, 2013 04:14 AM

    Thanks for your reply TGiles

     

    I have seen this posted on other forms however I'm unsure how exactly to impliment this.  AS it stands my connection string is:

     

    Server=172.16.42.8;UserId=XXX;Password=XXX;DataBase=XXX;

     

    I have added those options to the connection string as sugested to give me

     

    Server=172.16.42.8;UserId=XXX;Password=XXX;DataBase=cmdb;'Convert Zero DateTime=True; 'Allow Zero DateTime=True ;

    I am still getting the same error as before though, any ideas?

    Thanks



  • 4.  RE: Workflow and MySQL timestamp
    Best Answer

    Posted May 29, 2013 06:06 AM

    OK after a lot of looking at the database looks like I did have 3 zero date entrys which when updated removed the error.

     

    I noticed however that when I went to update the table in the generator with the Allow Zero DateTime=True option it threw an error (which I can't remember now) 

     

    All working now though.

     



  • 5.  RE: Workflow and MySQL timestamp

    Posted May 29, 2013 06:50 AM

    Just a minor note... you have single ticks in your conn string above (')... you probably caught that though.