Whats wrong in this SQL stat. ???? [modified] FOUND THE SOLUTION
-
i just put the sqlstat in a seperate string and it worked fine ;) hello all, when i run this sql stat, in query design, Access 2007 , it works fine and return records. SELECT fname, lname FROM names WHERE (location = 'there' AND id In (select id FROM name_street WHERE street = 11)) But when i put it in recordset as set rcset = db.openrecorset("SELECT fname, lname FROM names WHERE (location = 'there' AND id In (select id FROM name_street WHERE street = 11))") the record set brings back no records ... WHYYY ???? :confused:
0 will always beats the 1.
modified on Tuesday, February 8, 2011 3:08 AM
-
i just put the sqlstat in a seperate string and it worked fine ;) hello all, when i run this sql stat, in query design, Access 2007 , it works fine and return records. SELECT fname, lname FROM names WHERE (location = 'there' AND id In (select id FROM name_street WHERE street = 11)) But when i put it in recordset as set rcset = db.openrecorset("SELECT fname, lname FROM names WHERE (location = 'there' AND id In (select id FROM name_street WHERE street = 11))") the record set brings back no records ... WHYYY ???? :confused:
0 will always beats the 1.
modified on Tuesday, February 8, 2011 3:08 AM
Could be any number of reasons. Such as - You are not using the same database - There are uncommitted records. - You are not running the code that you think you are - You are using some process to determine whether records and that process, not the number of records, is wrong.