Commit 78ddbbb
### Work Item / Issue Reference
<!--
IMPORTANT: Please follow the PR template guidelines below.
For mssql-python maintainers: Insert your ADO Work Item ID below
For external contributors: Insert Github Issue number below
Only one reference is required - either GitHub issue OR ADO Work Item.
-->
<!-- mssql-python maintainers: ADO Work Item -->
>
[AB#42894](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/42894)
<!-- External contributors: GitHub Issue -->
> GitHub Issue: #458
-------------------------------------------------------------------
### Summary
<!-- Insert your summary of changes below. Minimum 10 characters
required. -->
This pull request makes a targeted fix to the parameter type mapping
logic for NULL values in the `mssql_python/cursor.py` file. The change
improves compatibility and prevents implicit conversion errors when
executing queries with NULL parameters.
Parameter mapping improvement:
* Changed the mapping for NULL parameters in the `_map_sql_type`
function to use `SQL_UNKNOWN_TYPE` instead of `SQL_VARCHAR`, allowing
the driver to correctly determine the column type and avoid conversion
errors.
<!--
### PR Title Guide
> For feature requests
FEAT: (short-description)
> For non-feature requests like test case updates, config updates ,
dependency updates etc
CHORE: (short-description)
> For Fix requests
FIX: (short-description)
> For doc update requests
DOC: (short-description)
> For Formatting, indentation, or styling update
STYLE: (short-description)
> For Refactor, without any feature changes
REFACTOR: (short-description)
> For release related changes, without any feature changes
RELEASE: #<RELEASE_VERSION> (short-description)
### Contribution Guidelines
External contributors:
- Create a GitHub issue first:
https://github.com/microsoft/mssql-python/issues/new
- Link the GitHub issue in the "GitHub Issue" section above
- Follow the PR title format and provide a meaningful summary
mssql-python maintainers:
- Create an ADO Work Item following internal processes
- Link the ADO Work Item in the "ADO Work Item" section above
- Follow the PR title format and provide a meaningful summary
-->
---------
Co-authored-by: Jahnvi Thakkar <61936179+jahnvi480@users.noreply.github.com>
1 parent 064f543 commit 78ddbbb
3 files changed
Lines changed: 46 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
| 399 | + | |
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| |||
2208 | 2208 | | |
2209 | 2209 | | |
2210 | 2210 | | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
| 2217 | + | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
2211 | 2221 | | |
2212 | 2222 | | |
2213 | 2223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
478 | 488 | | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | 489 | | |
483 | 490 | | |
484 | 491 | | |
| |||
4048 | 4055 | | |
4049 | 4056 | | |
4050 | 4057 | | |
4051 | | - | |
| 4058 | + | |
| 4059 | + | |
4052 | 4060 | | |
4053 | 4061 | | |
4054 | 4062 | | |
| |||
4112 | 4120 | | |
4113 | 4121 | | |
4114 | 4122 | | |
4115 | | - | |
4116 | | - | |
| 4123 | + | |
4117 | 4124 | | |
4118 | 4125 | | |
4119 | 4126 | | |
| |||
4252 | 4259 | | |
4253 | 4260 | | |
4254 | 4261 | | |
4255 | | - | |
4256 | | - | |
| 4262 | + | |
4257 | 4263 | | |
4258 | 4264 | | |
4259 | 4265 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
661 | 678 | | |
662 | 679 | | |
663 | 680 | | |
| |||
0 commit comments