[thelist] Classic ASP error only with OLEDB connection - weird

Ian Anderson ian at zstudio.co.uk
Sat Dec 17 17:04:28 CST 2005


Hi all,

I have a site that has been working for five years on one hosting 
environment. Moved it to a new host and got errors from pages that 
hadn't been touched.

Doing a little testing locally turned up that the issue seems to be the 
method of connecting to the Access DB.

Using a DSN, no problem.

Using an OLEDB connection string, I get

"ADODB.Fields (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested 
name or ordinal."

...from various places on the pages affected. Only two pages are affected.

The field names are correct for the database and tables concerned, so 
it's not the usual cause of this error. They are not single words, so no 
reserved keyword issues. Various field references generate the error 
from different recordsets, if you remove them one at a time.

Fixed it by using DSNLESS ODBC connection
"Provider=MSDASQL; Driver={Microsoft Access Driver (*.mdb)}; DBQ=..."

instead of OLEDB
"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=..."

Can anyone suggest a reason why this behaviour should have manifested 
itself, for future reference?

Thanks!

Ian

-- 
_________________________________________________
zStudio - Web development and accessibility
http://zStudio.co.uk

Snippetz.net BETA - Online code library
File, manage and re-use your code snippets online
http://snippetz.net




More information about the thelist mailing list