locked
Case sensitive in select statement-C#.NET RRS feed

  • Question

  • User-1578974752 posted

    SelectCommand="select distinct name ,CODE

    from STATUS,suppliers

    where _CODE= segment1

    AND INVOICE_NUM =:INVOICE_NUM

               In the above code , how can I modify so that , even If I type small letter or capital letter in invno textbox,I can retrieve the values based on the invoice number.

    Thanks

    Wednesday, March 17, 2021 12:26 AM

All replies

  • User-1545767719 posted

    SelectCommand="select distinct name ,CODE

    from STATUS,suppliers

    where _CODE= segment1

    AND INVOICE_NUM =:INVOICE_NUM

     

    ">

               <SelectParameters>

                    

                   <asp:ControlParameter ControlID="Invno" Name="INVOICE_NUM" PropertyName="Text" />

                  

               </SelectParameters>

           </asp:SqlDataSource>

     

    In the above code , how can I modify so that , even If I type small letter or capital letter in invno textbox,I can retrieve the values based on the invoice number in the grid view

    Thanks

    If you are using a data source control such as the SqlDataSource, you will be able to rewrite the parameter in the SqlDataSource.Selecting event.

    Wednesday, March 17, 2021 5:13 AM