CursorLocation Problem

CursorLocation Problem

Post by Art Krumse » Thu, 08 May 2003 17:17:46



I'm having a strange problem with CursorLocation.  I have a query that runs
against SQL Server 2000 produces a small recordset (less than 10 records).
It works great with the default cursorlocation (serverside) but if I change
the cursorlocation to clientside (connection.cursorlocation=aduseclient),
the query just hangs, never returning a recordset and never erroring out.
Has anyone seen behavior like this?

Art

 
 
 

CursorLocation Problem

Post by Victor Koc » Fri, 09 May 2003 06:46:51


Hi Art, change the CursorLocation property before open a conecction  or use
CursorLocation property of recordset.

...........
..........
connection.cursorlocation=aduseclient
connection.Open
...........
..........

--
Vctor Koch From Argentina.



Quote:> I'm having a strange problem with CursorLocation.  I have a query that
runs
> against SQL Server 2000 produces a small recordset (less than 10 records).
> It works great with the default cursorlocation (serverside) but if I
change
> the cursorlocation to clientside (connection.cursorlocation=aduseclient),
> the query just hangs, never returning a recordset and never erroring out.
> Has anyone seen behavior like this?

> Art


 
 
 

CursorLocation Problem

Post by Art Krumse » Fri, 09 May 2003 09:15:58


Thanks for the idea, Victor.  My code does set the cursorlocation property
before the open.  I've also tried setting the recordset cursorlocation prior
to opening the recordset.  In all cases the code freezes when this query is
issued.

Art


> Hi Art, change the CursorLocation property before open a conecction  or
use
> CursorLocation property of recordset.

> ...........
> ..........
> connection.cursorlocation=aduseclient
> connection.Open
> ...........
> ..........

> --
> Vctor Koch From Argentina.



> > I'm having a strange problem with CursorLocation.  I have a query that
> runs
> > against SQL Server 2000 produces a small recordset (less than 10
records).
> > It works great with the default cursorlocation (serverside) but if I
> change
> > the cursorlocation to clientside

(connection.cursorlocation=aduseclient),

- Show quoted text -

Quote:> > the query just hangs, never returning a recordset and never erroring
out.
> > Has anyone seen behavior like this?

> > Art

 
 
 

1. CursorLocation, AppendChunk and a strange problem!

Hi folks,
I've developed a multi-threaded program that writes some data chunk by chunk
(32K) into an image data field of SQL Server 2000. The job of each thread is
to write some specific data taken from a specific hardware card and store
this data chunk by chunk into the image data fields. So each thread does
something as follows (pseudo code):

CoInitialize(...)
Open the connection
InsertANewRowInDatabase(...)
While(!done)
{
        Take the chunk from the hardware device driver
        AppendChunk(...)
UpdateTheRecordset()
Close the recordset, connection and whatever
CoUnInitialize(...)

This is done simultaneously under 30 threads! I've noticed a strange memory
usage in my program. I started to clarify what the heck goes wrong there, in
my program, and I finally noticed it was all because of AppendChunk() call.
Today, (fortunately), I found that if I change the CursorLocation from
adUseServer to adUseClient everything works fine - there'll be no memory
leak this way! Now, I'm trying to understand this completely and that's why
I asked about CursorLocation.

Any idea?
Cheers,
Mehdi
--
MSVC++ Programmer and a web developer
Wanna create your own ISAPI Extensions? Take a look at my favorite article:
http://www.codeproject.com/useritems/isapi_extensions.asp

2. MTS - Oracle

3. CursorLocation: Client Side Cursor (How does it work?)

4. Rolback question

5. Set cursorlocation to client side

6. Executing queries on ODBC data sources from Oracle

7. ADO CursorLocation = Client

8. Odd behavior with SUSER_SNAME

9. CursorLocation w/ADO and Updates

10. .CursorLocation

11. redefining my adoclasses; cursorlocation

12. CursorLocation Properity