Bug 14903 - OdbcCommandBuilder generates wrong parameters for it's where clause
Summary: OdbcCommandBuilder generates wrong parameters for it's where clause
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Data (show other bugs)
Version: master
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-09-21 13:30 UTC by wdehoog
Modified: 2013-09-21 13:30 UTC (History)
1 user (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description wdehoog 2013-09-21 13:30:02 UTC
OdbcCommandBuilder generates special parameters for columns who allow NULL. However these are named the same as the columns which will result in type errors when binding the parameters.

It looks like the first parameter (named nullParam) created in CreateOptWhereClause needs always to be created with sourcecolumn being empty. If I do so no errors occur anymore and the query is ok.

As of why this works I guess this has to do with the way parameters are looked up in the parameter collection.

Note You need to log in before you can comment on or make changes to this bug.