[V4RB] - 2nd vCursor on DB is always Nil

RB User fitzbew at nc.rr.com
Wed Oct 5 14:40:53 CDT 2005


Using V4RB 2.0.5, OS X.3.9, RB2005r3
***

I have a local database that I create in code using dbDatabase.Create().

The db has only two tables, each has an identical structure. Just named
differently.

After I create/open the database, I run this query:
  
strQuery = "select distinct wxObsDate from wxDevData where location_key =
'000004' order by wxObsDate"
  
rstRecordSet = dbValaDatabase.SqlSelect(strQuery,
EVCursorLocation.kServerSide, EVLockType.kReadOnly,
EVCursorDirection.kForwardOnly)

The vCursor returns, and behaves perfectly normal, as expected.

I then set it to Nil. (rstRecordSet = Nil)

I then create a new cursor, on the OTHER table in the same database:

strQuery = "select * from wxDevData_toaster"

rstRecordSet = dbValaDatabase.SqlSelect(strQuery,
EVCursorLocation.kServerSide, EVLockType.kReadWrite,
EVCursorDirection.kRandom)

This second cursor is ALWAYS nil, no matter what I try.

DIAGNOSE finds no problems.
REINDEX doesn't help.
Same situation whether the tables are empty, or have only one record each.
The V4RB logs show no error, just a Return Object of 0.

I have experimented with different EV flags when creating the cursor, no
luck.

If I omit the first cursor, the second cursor is created successfully.

One thing I noticed during my experimentation to find a work around: If I
build the cursor using the New vCursor(dbref, query, etc..) syntax, the
cursor comes back as valid, but it's db reference in the RB2005 debugger is
Nil.  However, the db is NOT nil within the RB procedure.

Any ideas as far as what I may be doing wrong or overlooking? I'm just
becoming familiar with V4RB 2.x, so I could easily be making a newbie error.

(Ruslan, I have a small project that recreates the problem, and I'd be glad
to send you. Since I've imposed on you so much the last few days, I thought
I'd try this list first.)

-- 
Russ Tyndall
Wake Forest, NC







More information about the Valentina mailing list