AW: How to add multiple flags with createField?
Tiemo Hollmann TB
toolbook at kestner.de
Fri Mar 18 04:30:20 CDT 2011
Hi Ivan,
Thank you for helping. That was easy: "fIndexed, fUnique" did it. I didnt
knew that the wiki is a generic description, which has to be adapted.
Perhaps you could add such a hint, how to adapt the generic description to
the specific languages.
Perhaps you also have such an easy solution, why my CreateForeignKeyLink
doesnt works as expected. When using:
put VDataBase_CreateForeignKeyLink(gDBRef, "link_begriff_rubrik",
begriff.begriff_ID, rubrik.begriff_ID) into glinkRef
nothing is created (at least when checking in VStudio, there is no link). My
variable glinkRef still is empty but the VDataBase_ErrString( gDBRef ) also
is empty.
Same with quotes around the key- and ptr field and same with additionally
using: "kSetNull", "kCascade", false
The function just runs thru, without creating, without error.
Probably again not able to interpret your wiki?
Thanks
Tiemo
Von: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] Im Auftrag von Ivan Smahin
Gesendet: Freitag, 18. März 2011 09:04
An: valentina at lists.macserve.net
Betreff: Re: How to add multiple flags with createField?
On 3/18/2011 9:59 AM, Ivan Smahin wrote:
On 3/17/2011 7:32 PM, Tiemo Hollmann TB wrote:
Hello,
creating tables with the Valentina APIs from liveCode everything works fine
with using only one flag, like:
get VTable_CreateShortField(tblRef, "myFieldName", fIndexed)
Now I want to add the first time multiple flags to a field, but it fails
with any syntax shown in the wiki:
get VTable_CreateShortField(tblRef, "myFieldName", EVFlags.fIndexed +
EVFlags.fUnique)
with this syntax I get from LiveCode the error: +: error in left operand
same with
get VTable_CreateShortField(tblRef, "myFieldName", fIndexed + fUnique)
also not without the + or with quotes.
Probably I dont understand the wiki?
The wiki describes a general approach common for all ADKs.
V4REV's specific is - everything is passed as a strings. In particular you
should pass the set of flags as a tokenized string.
get VTable_CreateShortField(tblRef, "myFieldName", "fIndexed, fUnique" )
Possible token delimiters are : " ,\t\n+;"
So it could be
get VTable_CreateShortField(tblRef, "myFieldName", "fIndexed fUnique" )
get VTable_CreateShortField(tblRef, "myFieldName", "fIndexed,fUnique" )
get VTable_CreateShortField(tblRef, "myFieldName", "fIndexed\tfUnique" )
get VTable_CreateShortField(tblRef, "myFieldName", "fIndexed\nfUnique" )
get VTable_CreateShortField(tblRef, "myFieldName", "fIndexed+fUnique" )
--
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina/attachments/20110318/cf5cb6bb/attachment.htm>
More information about the Valentina
mailing list