rsCursorLocation = adUseClient Doesn't Work

rsCursorLocation = adUseClient Doesn't Work

Post by Sean Fische » Fri, 02 Jun 2000 04:00:00



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

 
 
 

rsCursorLocation = adUseClient Doesn't Work

Post by pedr » Sat, 03 Jun 2000 04:00:00


don't use adUseClient if you have not this line in your code
<!--#include File="adovbs.inc"-->
or use value: 0,1,2

Quote:> 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


 
 
 

rsCursorLocation = adUseClient Doesn't Work

Post by Sean Fische » Sat, 03 Jun 2000 04:00:00


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

 
 
 

rsCursorLocation = adUseClient Doesn't Work

Post by Cj Stremic » Sat, 03 Jun 2000 04:00:00


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

 
 
 

rsCursorLocation = adUseClient Doesn't Work

Post by Cj Stremic » Sat, 03 Jun 2000 04:00:00


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

 
 
 

rsCursorLocation = adUseClient Doesn't Work

Post by Cj Stremic » Sat, 03 Jun 2000 04:00:00


Yikes!  I can't read...  Sorry.

-C


> 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

 
 
 

rsCursorLocation = adUseClient Doesn't Work

Post by Sean Fische » Sat, 03 Jun 2000 04:00:00


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

 
 
 

rsCursorLocation = adUseClient Doesn't Work

Post by Sean Fische » Sat, 03 Jun 2000 04:00:00


All other ADO code appears to work correctly.

Interestingly, I noticed a similar post on Deja where the connection was to
a SQL connection.  Unfortunately nobody solved that one.

I am on hold know trying to figure out what code revisions are on the
server.

Thanks,

Sean


> 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

 
 
 

rsCursorLocation = adUseClient Doesn't Work

Post by Sean Fische » Sat, 03 Jun 2000 04:00:00


Checked conn.Version and determined my ISP is running ADO 1.0!

I am going to recommend an upgrade!!!


Quote:> 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
> Ce
> Thanks,

> Sean

 
 
 

rsCursorLocation = adUseClient Doesn't Work

Post by Egbert Niero » Sat, 03 Jun 2000 04:00:00


b.t.w. better not include adovbs.inc

use include this code snippet into global.asa
<!--METADATA TYPE="TypeLib" NAME="Microsoft ActiveX Data Objects 2.1
Library" UUID="{00000201-0000-0010-8000-00AA006D2EA4}" VERSION="2.1"-->


> 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