Zum Hauptinhalt gehen

SqlNonQuery: Value does not fall within the expected range

Kommentare

3 Kommentare

  • Berend Veldkamp

    For one, you shouldn't need quotes around values if they are parameters to your query (foldertype and actioncode). Unless of course those values actually are :foldertype and :actioncode. I don't know if this causes the error though.

    0
  • Sean McClurkan

    Thanks, Berend.

    Have you had any success executing a SELECT statement with an IN value in the WHERE clause? Particularly where the IN clause is a string of comma-delimited strings?

    0
  • Berend Veldkamp

    Yes, for SQL Server I use this. I suppose other types of database will have functions similar to string_split

    select * from myTable where myField in (select value from string_split(@values, ','))
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.