Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to compare strings

455054May 13 2011 — edited May 13 2011
I am trying to compare strings and for some reason it is not working. Firt time the code executes correctly and after that when I change my selection It never execute correctly.
the first time I chose "MN" it returns the correct row. after I change my selection form "MN" to "ALL" and get back to "MN" the code does not execute correctly. it is because I am comparing string with a value form variable.
  

If String.Compare(strStates1, "ALL", True) = -1 Then
               .Append(" AND R.STATE IN    (SELECT * FROM TABLE (CAST (func_select_state (:BindStates) AS B_state)))")
               cmdDBEVendors.Parameters.Add(New OracleParameter(":BindStates", OracleDbType.Varchar2)).Value = strStates1

  End If
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 10 2011
Added on May 13 2011
1 comment
266 views