Forums Register Login

Why doesn't find("3") work?????

+Pie Number of slices to send: Send
Hi folx, please help me!!!
[CODE]
Data data=new Data(location);//works fine
DataInfo result3=null;//wrong?
result3=data.find("3");//output is result3 is null, why???[CODE]
Thanks a lot for considering it!!!
+Pie Number of slices to send: Send
Hello Daniel,
You wrote:
[CODE]
Data data=new Data(location);//works fine
DataInfo result3=null;//wrong?
result3=data.find("3");//output is result3 is null, why???[CODE]
In my code Data's find compares the argument with the values[0],
where values[] is a DataInfo array. Therefore, I think, it should
match with Flight number and in my database there is no such
a number.
Chiao,
Ban
+Pie Number of slices to send: Send
Hi Andras,


In my code Data's find compares the argument with the values[0],
where values[] is a DataInfo array.


Same with mine!

Therefore, I think, it should
match with Flight number and in my database there is no such
a number.


Yeah, you are right! i agree with you that the argument toMatch should match with some Flight number! In my db.db file, THERE IS FLIGHT NUMBER. a typical output of a record is:
suncerfiy.db.DataInfo@2f6684recordNumber = 1
Fields: Name = Flight number value = SA001
Name = Origin airport value = SFO
......
I did wrong the first time for i followed Sun's instruction and use a record number as the argument which always "find" a null result. When Flight number value, say SA001, is used as "toMatch" string, the expected result comes out!
Thus, sun's wording is not quite right when it says "For this assignment, the key field is the record number field...@param toMatch The key field value to match upon for a successful find".
Anyone please correct me if i missed something here. Andras, thank you and good luck!
cheers!
Daniel
Eat that pie! EAT IT! Now read this tiny ad. READ IT!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 616 times.
Similar Threads
I want to merge the two files into one of kind: by placing englishKeyword=English in format Russian
Casting
Java Help!!!!!!
Problem with Double!!!!!!
String Replace Problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 06:20:19.