HardCode
04-16-2004, 11:28 AM
For the life of me, I can't remember the WHERE clause to use when you want the recordset to return empty, with only the recordset definition (field names, data types, etc.) Is it "WHERE 1 = 0" or is it "WHERE 0 = 0" or something like that?
ed_creed
04-16-2004, 12:38 PM
For the life of me, I can't remember the WHERE clause to use when you want the recordset to return empty, with only the recordset definition (field names, data types, etc.) Is it "WHERE 1 = 0" or is it "WHERE 0 = 0" or something like that?
where 1 = 2 or anything similar would work.
MKoslof
04-16-2004, 06:21 PM
I believe you are looking for this:
"select * from myTable where 1=0"
MKoslof
04-19-2004, 08:22 AM
No problem, I do queries like this when I need to return field names :). I assume this is along the lines of what you need..or something that returns no physical data from the table.
HardCode
04-19-2004, 08:33 AM
Yes. I wanted to iterate through each field of a recordset and add the field names into a combo box, without bringing over unnecessary data.
MKoslof
04-19-2004, 08:42 AM
Yep... you got it. That will work fine.