HELP: Invalid Cursor

forum.centura.web.developer (2000-2005) & forum.td.web (2005-2010)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

HELP: Invalid Cursor

Post by NewsgroupServer » 02 Apr 2007, 23:40

 Posted by:  Conrado ZAVALA 

Dear Newsgroup:

During My tests I've been able to run my web application perfectly. Today I
realize that if I try to do two queries at the same time (same query with
different users) only one of them return a result set.

After checking the Event Viewer I found an error that said "Invalid Cursor".
My guess is that the first query request disconnects my second (I don't know
why). My hSql was defined first globally, now I created locally at the form
level. Do I have to specify anything special for my Sql Handle in web
applications for it to work with multiple users (I'm using a reusable
application).

Regards,

Conrado

P.S. = I will really appreciate if someone could answer today... tomorrow I
have a presentation...

:(

Thanks

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

HELP: Invalid Cursor

Post by NewsgroupServer » 03 Apr 2007, 15:23

 Posted by:  Jim McNamara 

Sounds like you have a scoping problem with your 2 hSql variables. The
issue would be in your code as TD has always been rock solid with variable
scope. For a quick fix you can fully qualify the local one with
frmxxx.hSql - that will probably also help you find the problem.

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

HELP: Invalid Cursor

Post by NewsgroupServer » 03 Apr 2007, 17:37

 Posted by:  Conrado ZAVALA 

Thank You Jim, what I found is that I'm using Native Routers in my
application instead of OLEDB so if two users hit the Find button one the
first cursor gets disconnected it disconnects all cursors because it doesn't
distinguish that two user mean two session. My understanding is that I have
to use SQLBASEOLEDB but I have no experience with it... thanks for your
reply.

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

HELP: Invalid Cursor

Post by NewsgroupServer » 03 Apr 2007, 18:49

 Posted by:  Jim McNamara 

I think I'm missing something. How are 2 users getting on the same instance
of the page?

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

HELP: Invalid Cursor

Post by NewsgroupServer » 03 Apr 2007, 19:20

 Posted by:  Conrado ZAVALA 

My guess is that this is related to the way that web applications are
created by the GWD. Remember GWD require the use of State Variables. In
the case of a Sql Handle we don't have Stave Variables for them. So given
that you are running one EXE when you connect and disconnect a handle from
the database and someone else is currently connected while you disconnect
yours all cursors are disconnected too unless you set SqlUDL (System
Variable) to

Set SqlUDL = "SQLBASEOLEDB.1"

before a SqlConnect( ). SQLBase Native Router doesn't understand that every
connect is a different session. This is why they get disconnected because
it assumes that all cursors belong to the same session.

Try to replicate what I'm trying to say by creating two or three web
application sessions in your Internet Explorer and hit the submit button one
after the other for all your open sessions under the same page and you will
get a: Application Error message.

Regards,

Conrado

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

HELP: Invalid Cursor

Post by NewsgroupServer » 03 Apr 2007, 19:50

 Posted by:  Jim McNamara 

If that is the case:

1st - I wouldn't use a global handle to do anything but create the OLEDB
session

2nd - I'd be inclined to fully qualify most, if not all variables.

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

HELP: Invalid Cursor

Post by NewsgroupServer » 03 Apr 2007, 20:31

 Posted by:  Conrado ZAVALA 

Oh... this is not a problem with OLEDB... it only happens with SQLBase
Native Router.

Return to “td.web”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests