Hello,
I have a very intersting problem - SQL code which works with an ODBC
System DSN, but does NOT using OLEDB. I have a backend Access 97 database
against which I'm executing the following ASP code:
<%
Dim CountX
Dim AU
Dim MyConn
Set MyConn = Server.CreateObject("ADODB.Connection")
MyConn.ConnectionString="Provider=Microsoft.Jet.Oledb.4.0;Data
Source=D:\wwwsce\Databases\idbmasterfe.mdb"
MyConn.Open
Query = "SELECT DISTINCT tblCountries.[Country Name],
tblMasterType.Structure, tblMasterType.Service, tblOOBStatic.Component,
tblMasterType.[Unit Type Name], tblMasterType.[Special Name],
Count(tblOOBStatic.[Unit Name]) AS CountX, tblService.Name,
tblComponent.Name FROM (tblMasterType LEFT JOIN tblService ON
tblMasterType.Service = tblService.[Service Code]) INNER JOIN
(tblCountries INNER JOIN (tblOOBStatic LEFT JOIN tblComponent ON
tblOOBStatic.Component = tblComponent.Code) ON tblCountries.CountryCode
tblOOBStatic.Country) ON tblMasterType.UTC = tblOOBStatic.UTC GROUP BY
tblCountries.[Country Name], tblMasterType.Structure,
tblMasterType.Service, tblOOBStatic.Component, tblMasterType.[Unit Type
Name], tblMasterType.[Special Name], tblService.Name, tblComponent.Name
HAVING tblMasterType.Structure=" & CountryID & " ORDER BY
tblMasterType.Structure, tblMasterType.Service, tblOOBStatic.Component,
tblMasterType.[Unit Type Name]"
set AU = MyConn.Execute(Query)
........
%>
When I execute the above code - I receive the following error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
However, when I establish a System DSN, and use ODBC instead of OLEDB - it
executes perfectly.
Can any shed some light onto what exactly is the problem here and how I
could solve it - using OLEDB?
Thank you,
Mark McKamey
mckameym@c...