[thelist] Classic ASP error only with OLEDB connection - weird
Ian Anderson
ian at zstudio.co.uk
Sun Dec 18 07:04:31 CST 2005
Ken Schaefer wrote:
> Please post the code for the page in question.
>
> http://www.adopenstatic.com/faq/800a0cc1.asp
> covers the common causes of this problem
Thanks Ken - that nailed it.
The page in question was rather complex, so in constructing a minimal
test case to submit to the list as you suggested, I found the cause.
Despite having read your page carefully twice before posting, on the
third reading I realised it was one of the cases exactly as you described!
TblPartners.IDNumber, groupID, groupName, groups.IDNumber, etc
Using AS to provide a different name fixed it, as did removing one of
the instances of IDNumber - it shouldn't have been in there at all, let
alone twice, once I looked at the whole thing more closely.
But why did it only throw an error with an OLEDB connection, and not
cause an error with an ODBC connection?
Connection code is as follows:
set groupsRS = Server.CreateObject("ADODB.Recordset")
'groupsRS.ActiveConnection = "dsn=sllp2005;uid=;pw=;"
groupsRS.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=..."
groupsRS.Source = "SELECT TblPartners.IDNumber as ID, groupID,
groupName, groupDescription, groups.IDNumber etc"
groupsRS.CursorType = 0
groupsRS.CursorLocation = 2
groupsRS.LockType = 3
groupsRS.Open()
groupsRS_numRows = 0
(Was originally done in Dreamweaver UltraDev, if anyone remembers that
far back...)
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