I've got an ASP (classic) web app I programmed about 3 years ago and have developed continuously so it's fairly robust. I just switched from ADO/ODBC to OLEDB and I'm getting different resulting recordsets for a very specific query and I'm not sure why. This is simplified but very repeatable and I've definitely ruled out code bugs.
Table A:
column: ID int not null identity
column: Name varchar (255)
Table B:
column: aID int not null
column: bID int not null
Table B is totally empty (no records)
Query:
Code:
select * from [Table A] left join [Table B] on [Table A].ID = [Table B].aID
Results:
When using ADO/ODBC my recordset returns with all the items in Table A and nulls in the Table B columns.
When using OLEDB, my recordset returns with *no* records.
But then if I change the "*" to "count(*)" like so:
Code:
select count(*) from [Table A] left join [Table B] on [Table A].ID = [Table B].aid
then OLEDB *does* return the correct record count.
I've tried all sorts of variations and still can't get it. Ideas?
Thanks
