vCursor in Director: Arggghhh ;-)
Thomas Biedorf
thomas at startmovie.net
Wed Mar 2 18:05:30 CST 2005
Hi all,
I am using Valentina the first time and some questions appeared:
1) I can't find an explanation of kServer and kReadWrite used in the
Example "Write_Read_search.dir" and in conjunction with vCursor and
new. What is it used for and which integers do what in specific? I
didn't find anything about it in the PDFs and Lingo Sources.
2) I want to use vCursor to do an "INSERT INTO" and all I get is an
vCursor error 602. Maybe I am missing something?
I am aware that I don't understand the concept of vCursor right now in
deep! It would be great if someone is pointing me in the right
direction. I really don't want to use AddField(), I only want to work
with SQL-Statements!
Here is a part of my Script:
--- snip
on DBsql(mDebug, mDBName, mPath, mSQL)
ValentinaInit ( 4194304, "", "" ) -- no serial right now
ValentinaDebugLevel ( mDebug )
mVDB = new(xtra "VDataBase")
OpenDatabase(mVDB, mPath & mDBName)
mCurs = new( xtra "VCursor", GetRef(mVDB), mSQL, 2, 3) --- 2 and 3
are the mentioned kServer and kReadWrite from the
"Write_Read_search.dir" Example
--- Do I have to do something after this new()?
--- I think "yes", but I don't know what... ;-)
--- I thought an INSERT INTO will lead to an empty cursor
--- and I don't have to do anything here?!
CloseDatabase(mVDB)
Flush (mVDB)
ValentinaShutDown
end
--- end snip
I am calling DBsql with
DBSql (2, "VDBname.vdb", "path/to/VBD/", "INSERT INTO tablename
(fieldname) VALUES ( " "E& "myvalue" "E & ")" )
fieldname is a varchar 255.
All I get then is:
* V4MD *: new VCursor...error 602
Thanks in advance for any hint!
Regards,
Thomas
More information about the Valentina
mailing list