Invalid Curs ref

Zav - Alex Zavatone zavpublic at mac.com
Sun May 4 14:12:08 CDT 2003


>I swear this used to work last week.  Today it returns a - value for 
>the cursor and an error on setblank.  Any idea why?
>
>Mac OS X 10.2.5, DMX.
>
>Before running, I InitValentina and manually delete the username.vdb file
>
>on CreateUserDatabase
>   put "creating user database"
>   myDBPath = the moviepath & "username.vdb"
>   myDBTable = "Users"
>   myDB = new( xtra "VDatabase")-- NEW INSTANCE OF THE XTRA
>
>   CreateDataBase(myDB, myDBPath,1) -- CREATE DATABASE FROM SCRATCH
>
>   -- MAKE A TABLE  **** The baseref OBJ is the table
>   myBaseTableRef = MakeNewBaseObject(myDB, myDBTable)
>     valentinaSetExtensions(["vhd","vdb","vdx","vbl"])
>
>   -- ...then your addField stuff.
>   userField = AddField(myDB, myBaseTableRef,"Username",#kTypeString,10)
>   passwordField = AddField(myDB, myBaseTableRef,"Password",#kTypeString,10)
>   hintField = AddField(myDB, myBaseTableRef,"Hint",#kTypeString,30)
>
>   -- create a cursor object
>   myDBref = myDB.GetRef()
>   --
>   myCrsRef = new(xtra "VCursor", myDBref, "SELECT * FROM" && myBaseTableRef)
>   myCrsRef.SetBlank()
>
>Thanks.

The error message Valentina is giving me is 602 (Table not found) for 
the curs ref.  What I fail to comprehend is why can't Valentina 
create a cursor for a table it just created?  I'm passing the correct 
ref right?
-- 
- Zav
Lost in the translation.


More information about the Valentina mailing list