Custom Sql Odbc Error
When setting up a database connecting using a custom SQL statement, I am getting an ODBC error. It looks like bartender is attempting to run the stored procedure and is passing in the QueryPrompt variable.. I have tried setting a default reply for the Query Prompt, but I get the same error
exec api.LabelQC @Param = N'?QueryPrompt1'
-
When using an ODBC connection, it shows an error but it does not save the query.
This is only happening for DSNs. When I connect directly from BarTender using SQL Server OLE DB, I get an error message, but BarTender saves the custom query.
0 -
I made a change to the stored procedure to check if the value passed is numeric. If the value is not numeric it defaults to 0 then returns an empty result set. Doing this prevents the SP from bombing on the conversion of the passed BarTender string parameter to integer.
Here is the workaround.. Not very elegant, but it works..
WHERE ID = CASE WHEN IsNumeric(@Param) = 1 THEN @Param ELSE 0 END
0 -
Shotaro Ito
★ BarTender Hero ★
Thanks nhadley, for sharing the workaround!
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare