Need help comparing db field values in c++
Hello,
I am trying to compare 2 different text fields from ms sql db, and want to set a condition based on wether or not the 2 text fields contain the same text or not. I believe that c++ is setup to use a character array to hold the db fields, and I have tried to use strcmp to compare the values, but it seems like I am only getting comparisions on whether or not the db fields are NULL or not, and that it is not actually comparing the db field values.
Basically all I need to do is:
if field1 value is not equal to field2 value, then outofrange=1.
I used != to specify inequality, but like I said before, it's almost like it's not looking at the value of the fields, only at whether or not the fields are NULL.
Am I doing something wrong?
I am pretty new to c++, apologies for my ignorence.
Thanks in advance for any help!
M