You are viewing limited content. For full access, please sign in.

Question

Question

Error converting data type varchar to numeric in Forms log on LF server

asked on August 21, 2024 Show version history

I'm seeing several errors coming from a particular form (log text below). The form seems to be working fine and the users have not mentioned any specific issues, so I'm curious as to why this particular form is throwing this type of error. Any ideas?

 

An unexpected error has occurred. [LFF502-UnexpectedError]

Details:
URL: /Forms/form/lookup
Error: UnexpectedError
Date: 8/21/2024 12:44:52 PM (Pacific Standard Time)
HTTP Status Code: 500
Business Process ID: 0
User: TA\PQuinones
IP: 
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Business Process Name: 

Stack Trace:
Caught exception: Laserfiche.Forms.CommonUtils.Exceptions.LFFormsException
Message: An unexpected error has occurred. [LFF502-UnexpectedError]


Inner exception: System.Data.SqlClient.SqlException
Message: Error converting data type varchar to numeric.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows)
   at System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more)
   at System.Data.SqlClient.SqlDataReader.Read()
   at System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping)
   at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
   at System.Data.Common.DataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
   at Laserfiche.Forms.EntityModels.Data.MSSqlDBConnector.GetStoredProcedure(String storedprocedure, List`1 parameters, Int32 timeout)
   at Laserfiche.Forms.CommonUtils.LookupServiceProvider.InternalGetLookupResult(Expression`1 ruleCondition, Dictionary`2 lookups, IEntityContext context, String LogonUserName, Boolean isDraft)

0 0

Answer

SELECTED ANSWER
replied on August 23, 2024

Hi Mike,

The error sounds come from a lookup rule which configured as a stored procedure, can you recall any form design using stored procedure to lookup?

1 0
replied on August 23, 2024

I found the stored procedure used in the lookup rules; it was passing variables as varchar instead of decimal. I've updated it, and I'll keep an eye out for any other errors. Thanks for the pointer in the right direction!

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.