
Query/Recordset problem on inner join with sql oledb provider
I have a query that populates an ADO recordset with an inner join between
two tables with identical stuctures, representing two different sets of
data.
So, for example the tables are year and qtr:
select * from [month] inner join [year] on [month].[employeeid] =
[year].[employeeid]
Now, let's say the the tables each have the field name TotalPay.
When I try to reference rs![month].[TotalPay] or rs![year].[TotalPay] I
receive the following error:
"Error 3265: Item cannot be found in the collection corresponding to the
requested name or ordinal."
However, the problem is not bound to ADO explicitly, because I can access
the the fields as shown above when I switch the provider to Jet 4. The
problem is not within SQL Servers query engine, because if I run
select [month].[TotalPay] ,[year].[TotalPay] from [month] inner join [year]
on [month].[employeeid] = [year].[employeeid]
in the SQL Server query analyzer I have no problems, as well I shouldn't.
I was hoping there was something very obvious here that I am missing here.
Thanks for any help,
Matt