Passing a SQL parameter to an IN() clause using typed datasets in .NET

后端 未结 8 2077
别跟我提以往
别跟我提以往 2020-11-28 10:31

First apologies as there are similar questions on this site, but none of them answer this problem directly.

Im using typed datasets in VS 2010. I create a TableAdapt

8条回答
  •  佛祖请我去吃肉
    2020-11-28 11:30

    The only database I know of that can use parameters from .NET in an IN clause is PostgreSQL, because PostgreSQL has a concept of arrays that can be used with IN and Npgsql allows array (or IEnumerable) parameters.

    With other databases you have to either construct the SQL, or pass a string to a database procedure that converts it to the 0-or-more parameters and then acts on them.

提交回复
热议问题