Start New Discussion Reply to this Discussion how to compare records obtained from DB
Hi,
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()
puts record
end
if (str == record.to_s.strip) #This keeps on failing.
puts "this record verified"
end
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.
sum1
Newbie Poster
1 post since Feb 2009
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
© 2013 DaniWeb® LLC
Page generated in 0.0497 seconds
using 2.56MB