All other ADO code appears to work correctly.
> Nah - I was just stupid when I read it. Your code looks right to me. I'm
> not sure why IIS vs. PWS would make a difference here. Do you have the
same
> version of MDAC installed on both machines? Are any other ADO things not
> behaving the same between configurations?
> I've used CursonLocation tons before and have never seen it just not work.
> This is an odd one.
> -C
> > Looking at the code, I believe the CursorLocation is set before the
> > recordset is opened.
> > Do you possibly mean before the connection is opened?
> > Also - just to point out again - this code works under PWS.
> > Thanks Again,
> > Sean
> > > Set the CursorLocation propert BEFORE you open your recordset. ;-)
> > > -C
> > > > Thanks, I should have included that in my email.
> > > > I do have <!--#include File="adovbs.inc"-->.
> > > > I also tried using the numeral 3. This is what is mapped to
> > adUseClient.
> > > > This still doesn't work.
> > > > Thanks,
> > > > Sean
> > > > > don't use adUseClient if you have not this line in your code
> > > > > <!--#include File="adovbs.inc"-->
> > > > > or use value: 0,1,2
> > > > > > I have an ASP web page that opens a DSN to an Access database
> (code
> > is
> > > > > > below). This works fine on my Win 98 Personal Web Server (PWS).
> > This
> > > > > exact
> > > > > > code does not work when uploaded to an NT Server running IIS
4.0.
> > It
> > > > > isn't
> > > > > > my server, so I don't have the exact version info.
> > > > > > I get error '80040e21' on the rs.Open line. If I rem out the
> > > > > > cursorlocation line, the query executes. It works (ie
> > rs.PageCount, )
> > > > but
> > > > > > no data is visible (which is to be expected).
> > > > > > Are there any differences in ADO versions that cause this (ie
> > > different
> > > > > > cursorlocation values)? Any other ideas?
> > > > > > Set conn = Server.CreateObject("ADODB.Connection")
> > > > > > Set rs = Server.CreateObject("ADODB.Recordset")
> > > > > > conn.Open ConnString
> > > > > > rs.CursorLocation = adUseClient
> > > > > > rs.PageSize = iPageSize
> > > > > > RS.CacheSize = iPageSize
> > > > > > strSql = "SELECT * FROM table ORDER BY sort"
> > > > > > rs.Open strSql, conn, adOpenStatic, adLockReadOnly, adCmdText
> > > > > > Thanks,
> > > > > > Sean