Hi
I have a data table which is pulling directly from a SQL database into outsystems, the data table has an Id column that is auto-numbered and 3 other text columns.
When using a CreateOrUpdate on the data table i get the following error message.
"Object cannot be cast from DBNull to other types"
my 3 text columns have assigned strings, my ID field is 0 (the table is still empty)
Would anyone be able to shed some light on the issue?
Many thanks,
Alex
Alex O'Farrell wrote:
It seems you are assigning your table data to some variable. As there is no data so it is throwing DBNull.
You need to put a condition to verify the data is available to be assigned.
DBNull will be required to check only for INT fields. It is not required for string :) Just to make sure.
Hi Alex,
Are you using an extension to map the table into an entity?
If so, make sure the auto-numberedcolumn's definition in the extension looks like this:
Hi,
Some follow up questions:
What type of database is it? MsSql, Oracle, MySql, ...?
Also does the table have any associated triggers?
Also what version of the platform are you using?
Regards,
João Rosado