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

Fix invalid precision error #1497

Merged
merged 8 commits into from
Jan 22, 2024
Merged

Fix invalid precision error #1497

merged 8 commits into from
Jan 22, 2024

Conversation

MichaelSun90
Copy link
Contributor

Fix for issue #1491

@MichaelSun90
Copy link
Contributor Author

Upon discuses, we decide to not do the SQL data type reset step within bind params function that initially there for fixing #1448. With that change, the find_param return a param with SQL unknow data type when execute the prepared query for the second time which will later be process into a SQL wvarchar type. When the logic try to bind the wvarchar with the input 8000 size which is twice the max size for a wvarchar type can hold cause the invalid precision error. This type process is related to a older version of utf8 encoding handling. The varchar type able to hold utf8 and utf16 encoding for newer version SQL server (later then 2019), and the handling for this and backward compatibility may come in a later. If the logic does not reset the SQL type unknow, the find_param will return the stored datatype varchar, and 8000 size will no longer be a problem. For the issue #1448, if user properly handles the input param data, then the current logic should handles the task without a problem. Also, the error :"Invalid character value for cast specification" returned for that issue seems properly informed the user the cause for the error.

@MichaelSun90 MichaelSun90 changed the base branch from master to dev January 22, 2024 21:15
@absci absci merged commit 09c53ef into dev Jan 22, 2024
4 of 6 checks passed
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 this pull request may close these issues.

2 participants