This topic is locked
[SOLVED]

Table edit and add working, list returns an error

4/16/2021 3:51:00 PM
ASPRunner.NET General questions
A
Alan Coleman author

Hello everyone

This is a bit of an odd error that I haven't seen before, although it's a fairly standard .NET Error.

This part of my .NET Runner application has always worked fine, I don't know why this error is now being returned.

Here is my database table, note that I can see that the database table hasn't changed in my version control:

img alt

In .NET Runner the Edit and Add view work fine, List view returns the following error:

Server Error in '/' Application.
Conversion failed when converting the nvarchar value 'Microsoft Trainingsgutscheine ' to data type int.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Conversion failed when converting the nvarchar value 'Microsoft Trainingsgutscheine ' to data type int.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SqlException (0x80131904): Conversion failed when converting the nvarchar value 'Microsoft Trainingsgutscheine ' to data type int.]

Note that there is an attempt to convert an nvarchar into an int, which seems a little odd.

This is what I've tried:

  1. Resyncing the database
  2. Removing the table and adding back in after rebuild
  3. Removing List view and adding back in after rebuild

Any ideas would be appreciated.

FrankR_ENTA 4/16/2021

Do you have any Event code, or is this purely what Runner generated?

When you look at Fields and Properties of that field, what's there?

admin 4/16/2021

Show us "View as" and "Edit as" properties of this field.

A
Alan Coleman author 4/19/2021

Many thanks for replying.

I think that this is the information you're looking for.

I hadn't considered removing this field from the build in an attempt to isolate the issue, I'll give that a go now.

Thanks again.

img alt

img alt

A
Alan Coleman author 4/19/2021

I've also checked the schema in my database, which remains unchanged and looks as though is being interpretted correctly by Runner.

img alt

img alt

A
Alan Coleman author 4/19/2021

I removed the table from the build completely, deployed a release, before adding it back in.

This sorted out the issue. To be fair I should have tried this initially.

Thanks again for your help.