V4MD cursor xtra "Wrong number of parameters" error

Andrew Sinning andrew at learningware.com
Thu Aug 21 09:42:52 CDT 2003


What do you mean by "Replace"?  Is there a newer file that I should be
using?

It works with the first 3 parameters, so that means the xtra is
installed, right?

Why it doesn't work with 4, 5 or 6 parameters is the mystery.

There's only 1 example in the documentation which uses more than the
first 3 parameters:

	set gCursor = new ( Xtra "VCursor", GetRef(gMyDataBase), SQLstring,
kClient, kReadOnly, kForwardOnly )

This is exactly what I am using, only the variable names are a bit
different:

such as

  -- inLocation:
  kClient =1
  kServer =2
  -- inLockType:
  kNoLock =1
  kReadOnly =2
  kReadWrite = 3
  -- inDirection:
  kForwardOnly = 1
  kRandom = 2

  sql = "SELECT id, idName FROM indices WHERE idName = 'qId'"

  -- note "db" is an object, and db.dbConn is the "VDataBase" xtra with
an open connection to my db.

  -- just 3 params
  theCursor = new(xtra "VCursor", db.dbConn.GetRef(), sql)
  -- WORKS !!!

  -- all 6 params
  theCursor = new(xtra "VCursor", db.dbConn.GetRef(), sql, kClient,
kReadWrite, kForwardOnly)
  -- Nope! {Script Error "Wrong number of parameters"}

  -- 4 params
  theCursor = new(xtra "VCursor", db.dbConn.GetRef(), sql, kClient)
  -- Nope! {Script Error "Wrong number of parameters"}

  -- 5 params
  theCursor = new(xtra "VCursor", db.dbConn.GetRef(), sql, kClient,
kReadWrite)
  -- Nope! {Script Error "Wrong number of parameters"}

-----Original Message-----
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net]On Behalf Of Ruslan
Zasukhin
Sent: Thursday, August 21, 2003 9:21 AM
To: valentina at lists.macserve.net
Subject: Re: V4MD cursor xtra "Wrong number of parameters" error


on 8/21/03 5:10 PM, Andrew Sinning at andrew at learningware.com wrote:

> According to the documentation, creating a new cursor instance
("xtra")
> has 3 optional parameters {location, lockType and direction}; however,
> any attempt to specify more than the first 3 required parameters {new
> object me, integer VDataBaseRef, string SQLquery}results in an error
> "Wrong number of parameters".
>
> How do I specify a non-default parameter location, lockType or
> direction?  Perhaps this is a restriction of the demonstration
> (unregistered) version?

Andrew,

May be you have not replace V4MD.Xtra in plugin folder???

If you look into our examples, you will see many places where present
these
3 parameters.

Please check if our examples work for you

--
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------

_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina




More information about the Valentina mailing list