I have created a DB connection using OCI and got a record(type: varchar2), but I'm unable to compare it with a string (this is string is same as the one which I retrieved from DB).
Below given is a code
conn = OCI8.new('username', 'pwd', 'DBNAME');
cursor = conn.exec('select fieldname from tablename where id = :1', '1234');
while record = cursor.fetch()
if (str == record.to_s.strip) #This keeps on failing.
puts "this record verified"
Related Article:Algorithm to compare java codes
is a Web Development discussion thread by c_Newbie that has 1 reply, was last updated 3 years ago and has been tagged with the keywords: , script-configuration.