Skip to content

when inserting value in vector data type, parameter needs to be converted to nvarchar max. Otherwise it is getting treated as nText and throwing conversion error. #10

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Utsavv
Copy link

@Utsavv Utsavv commented Dec 27, 2024

Purpose

  • ...

Does this introduce a breaking change?

[ ] Yes
[ x] No

Pull Request Type

What kind of change does this Pull Request introduce?
when inserting value in vector data type, parameter needs to be converted to nvarchar max. Otherwise it is getting treated as nText and throwing conversion error.

[x ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
    Original code was failing with error

pyodbc.DataError: ('22018', '[22018] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Explicit conversion from data type ntext to vector is not allowed. (529) (SQLExecDirectW); [22018] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Statement(s) could not be prepared. (8180)')

This change will make it work.

git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

Execute hybrid-search.py file.

What to Check

Verify that the following are valid

  • ...
    File should execute successfully.

Other Information

…rted to nvarchar max. Otherwise it is getting treated as nText and throwing conversion error.
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.

1 participant