I am facing a weird problem. I am using the following select query unsing VB6.

strquery = "SELECT * from item_lne where order_no = " + CStr(orderNum) + " AND (delete_lne = 'F' or delete_lne is null)"
Set localrecordset = AGFDB.CONAGF.Execute(strquery)

If localrecordset.RecordCount > 0 Then


end if

database engine used is db2k. ODBC is being used for database connectivity, and OS is Windows XP.

when I run "strquery" on db2k command windows it shows me correct result for 8 records, but in program it returns "localrecordset.RecordCount " as 40.

The same software connected to same database is working well, and it is giving me this error only when I am trying to install it on some other computers (same software connected to same database)

Can anyone suggest me if this error has something to do with system "dll" files or BDE or runtime engine or what..? I am clueless.

or please suggest me some resources where I can get some help.