Input string was not in a correct format.

  • 25 April 2016
  • 3 replies
  • 9 views

Badge +1

I get this error when I try to load a list view. 

Datasource is Oracle.

 

Please someone help, I'm pressed with time to deliver.

 

 

Input string was not in a correct format.
 
  • Type:
    SourceCode.SmartObjects.Client.SmartObjectException
  • Source:
    SourceCode.SmartObjects.Client
  • Method Base
    • Member Type:
      Method
    • Name:
      GetSmartObjectReader
    • Module
      • Scope Name:
        SourceCode.SmartObjects.Client.dll
    • Declaring Type
      • Full Name:
        SourceCode.SmartObjects.Client.SmartObjectClientServer
  • Stack Trace:

    at SourceCode.SmartObjects.Client.SmartObjectClientServer.GetSmartObjectReader(SmartObject smartObject, ExecuteListReaderOptions options, Dictionary`2& propertyReference)

    at SourceCode.SmartObjects.Client.SmartObjectClientServer.ExecuteListReader(SmartObject smartObject, ExecuteListReaderOptions options)

    at SourceCode.Forms.AppFramework.FormsApiToXml.ToXmlList()

    at SourceCode.Forms.AppFramework.FormRuntime.SmartObjectExecution(XPathNavigator nav, Boolean outputDependencies, SmartObjectClientServer svr)

    at SourceCode.Forms.AppFramework.FormRuntime.WorkXmlToApi(String xml)

    at SourceCode.Forms.Runtime.AJAXCall.ProcessRequest(HttpContext context)

3 replies

Badge +2

Hi,

 

Have you try executing the smartobjec that populate the list view through the SmartObject Service tester?  

 

C:Program Files (x86)K2 blackpearlBinSmartObject Service Tester.exe

 

It will help if you can verify the data are populate correctly first.

Badge +1

Hi,

 

I had done that and it was failing on the SmartObject exceution. 

I then did more investigation on the kind of data being returned by the smart object which is connecting to the stored procedure in the Oracle DB, I found that there are some fields of data type of Number which were null which were the reason for the error.

 

I then edited the stored proc to replace those null values with a 0 then everything went smooth.

Userlevel 1
Badge +8

...and this is why I wrote a novel in another post pushing the use of stored procedures for this very reason. The Oracle broker is terrible with null values. A trick that I use if I am not certain my data doesn't not contain nulls is to use COALESCE and return an empty string instead of a null.

 

S.

Reply