Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled exception executing select statement with mismatched datatype in where clause #506

Closed
tsileo-wdi opened this issue Jul 9, 2024 · 0 comments · Fixed by #507
Closed

Comments

@tsileo-wdi
Copy link

Hi Mark - I love SQL 4 CDS! Thanks for creating and maintaining it!

I am getting the unhandled exception pasted below every time I try to execute this query with the where clause included:

select wdi_name from wdi_assignmenttype where wdi_workflow = 'Task' ;

If I execute without the where clause, it works just fine.

I finally realized I need to use wdi_workflowname (it's a lookup column), but I'm also thinking you're missing an exception handler somewhere?

Msg 2786, Level 16, State 1, Line 7
The data type of substitution parameter 2 does not match the expected type of the format specification.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at MarkMpn.Sql4Cds.XTB.SqlQueryControl.ShowResult(IRootExecutionPlanNode query, ExecuteParams args, DataTable results, String msg, QueryExecutionException ex)
at MarkMpn.Sql4Cds.XTB.SqlQueryControl.backgroundWorker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)

@tsileo-wdi tsileo-wdi changed the title Repeatable Error Executing Select Statement Unhandled exception executing select statement with mismatched datatype in where clause Jul 9, 2024
@MarkMpn MarkMpn mentioned this issue Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant