Passing an Empty String or Byte into a Required Binary Column in ASE

When defining an MBO from an Adaptive Server Enterprise data source an error message displays if you pass an empty string or empty byte[] into a required binary column in ASE results in an ASE non-nullable column exception.

  1. Create the MBO. For example, drag and drop an ASE data source onto the mobile application diagram.
  2. Create a Create operation named create1.
  3. In the Parameters page of the New operation wizard, click Next and it throws a RuntimeException if performing the described action. For example:
    Error executing on back-end server: 
    java.lang.RuntimeException: java.lang.RuntimeException: 
    com.sybase.jdbc3.jdbc.SybSQLException: The column binary1 
    in table pubs3.dbo.AllDataTypes does not allow null values. 
  4. Running 'Test Execute' for the Create operation also throws an error:
    Execution failed: The column binary1 in table 
    pubs3.dbo.AllDataTypes does not allow null values

Solution: use "IA==" as the default value for the binary(1) argument. Create a new Create operation, and select 'Test Execute' to verify it works correctly.

Related concepts
AutoCommit Option for JDBC MBOs Using an ASE Data Source
Related tasks
Binding an MBO to a Database Fails
Multilevel Insert Operation Fails
Attribute Length Set Incorrectly for Operation and Load Arguments
Unable to properly update the CDB because the partition was improperly assigned
Related reference
MBO Retrieves Incorrect Data
Relationship Error
Warning Message When Creating Relationships
Troubleshooting Default Values for Adaptive ServerĀ® Anywhere uniqueidentifiers
Preview Errors for a Web Service Mobile Business Object with date/time Types
Web Service Mobile Business Object Must Be Connected to Connection Profile
Refresh Fails Due to Missing Load Argument Default Values
Input Parameters Fail to Generate for Complex Data Sources
Output Mapping Warning Message for Multilevel Insert Operations
Syntax Errors When Creating a Database Mobile Business Object
Sybase MBOs That Invalidate the Cache