DataType Parameter throwing an error

Okay. You are correct. No matches.

I have no problem with it without the quotes.

image

Maybe you had some other typo at the time.

edit

To be fair, I didn’t make a multi table query like yours. I just added a single table containing a field of varchar

Here’s the error:

System.Data.SqlClient.SqlException (0x80131904): Must declare the scalar variable "@Project".
   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)

And “Project” shows in the Expression editor?

Try re-creating the expression. Delete the current expression (in the Expression editor), then recreate it, but don’t type in @Project, double click it in the Available parameters area.

image

(yes, I made mine named different from yours … ignore that)

No, it doesn’t.

Should all 3 parameters in this list show in that expression screen?

I would think so.

If I add another param or two, I see …

and in the editor …

image

I’m on version 10.1.400.23 too.

P.S. - I Fixed my param name to match yours

10.2.300.24

I’d be shocked if something so big as to prevent Params from being used in a BAQ expression to have been introduced in a minor revision

I gotta run now. If I get time later tonight I’ll build a whole extBAQ as close to yours as possible

1 Like

Starting a new case, now,
Thanks!

I started a new BAQ.
When I have one Parameter, it will show in the SQL Expression Editor.
When I add my 2nd and 3rd, the SQL Expression Editor shows none!
When I delete the 2nd & 3rd, SQL Expression Editor continues to show none.
I have an active case with support on this.

Also, on my new BAQ I generate the same error. I’m building this in our 2nd environment, BTW.

That’s really weird…

I made a extBAQ as close to yours as I could

and I can see them in the expression editor

image

One more thing … Why do you have FULL OUTER Joins between the tables?

In my recreation, I didn’t do that.

image

Unchecking the “Skip condition if empty” on the Parameter allows the field to show in the SQL Expression Editor.

Interesting side note: I had to set the parameter Default Value to 0 on the Integer type to finally get this working perfectly.

@ckrusen - Thanks for your efforts to help me! Appreciated

1 Like