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

firebird sql generators error #489

Closed
drcrck opened this issue Mar 16, 2021 · 2 comments
Closed

firebird sql generators error #489

drcrck opened this issue Mar 16, 2021 · 2 comments
Assignees
Labels
accepted Issue has been accepted and inserted in a future milestone as-designed The behaviour is correct/expected

Comments

@drcrck
Copy link

drcrck commented Mar 16, 2021

Hi Daniele,
there a bug in firebird sql construct if there are fields with spaces.
it's all ok for select, but update or insert crash.
in MVCFramework.SQLGenerators.Firebird should be modified CreateInsertSQL and CreateUpdateSQL
adding call to "GetFieldNameForSQL" and "GetParamNameForSQL" during sql creation.

row 107: lSB.Append(GetFieldNameForSQL(lKeyValue.Value.FieldName) + ',');
row 121: lSB.Append(':' + GetParamNameForSQL(lKeyValue.Value.FieldName) + ',');

and

row 186 : Result := Result + GetFieldNameForSQL(lKeyValue.Value.FieldName) + ' = :' + GetParamNameForSQL(lKeyValue.Value.FieldName) + ',';

ciao :)

@danieleteti
Copy link
Owner

Hi. Currently fields with staces are not supported in FirebirdSQL, so this is the expected behaviour.
We'll consider your suggestions to implement the support.

Thank you

Ciao :-)

@danieleteti danieleteti added accepted Issue has been accepted and inserted in a future milestone as-designed The behaviour is correct/expected labels Mar 16, 2021
@danieleteti danieleteti self-assigned this Mar 16, 2021
@danieleteti danieleteti added this to the 3.2.2-nitrogen milestone Mar 16, 2021
@danieleteti
Copy link
Owner

The fix is in the repo. Please, test it and let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Issue has been accepted and inserted in a future milestone as-designed The behaviour is correct/expected
Projects
None yet
Development

No branches or pull requests

2 participants