-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[BUG] MSSQL Safe SQL Parameter Not Working #3799
Comments
This is an example provided by the third-party library the illa-builder is using: https://github.com/microsoft/go-mssqldb?tab=readme-ov-file#parameters. The |
According to the code comments at https://github.com/illacloud/builder-backend/blob/8664551df998df0fe2711b51d6ef8e439fa8b2d5/src/utils/parser/sql/escaper.go#L371, changes need to be made in the way SQL is written. |
@naj1n , |
@naj1n , |
I will try to run some tests and will update here with any progress. |
Description
When I run query using safe SQL parameter, I got Incorrect syntax near '?'.
Steps to reproduce
exec sp_executesql N'select der.*
from DailyExchangeRate der
where der.SrcCurrencyId<>''USD'' and
Date between ? and ?',N'@p1 nvarchar(max),@p2 nvarchar(max)',@p1=N'',@p2=N''
exec sp_executesql N'select der.*
from DailyExchangeRate der
where der.SrcCurrencyId<>''USD'' and
Date between @p1 and @p2',N'@p1 nvarchar(10),@p2 nvarchar(10)',@p1=N'2024-03-01',@p2=N'2024-07-31'
Version
self-host
ILLA Builder Version
latest
Browser
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: