Subject: | Re: Using variable with tcursor use setvalue?
| Date: | 17 May 2019 00:37:12 -0400
| From: | "Kevin Zawicki" <numberjack@wi.rr.com>
| Newsgroups: | comp.databases.paradox
|
try this:
Syntax
1. setFieldValue ( const fieldName String, const value AnyType ) Logical
2. setFieldValue ( const fieldNum SmallInt, const value AnyType ) Logical
Description
setFieldValue sets the value of the field specified byfieldName (or fieldNum)
to value. This method returns True if successful; otherwise, it returns False.
You can also set the value of this field using dot notation. For example,
this statement uses dot notation to change the value in the Last Bid field:
tcVar."Last Bid" = 32.25
The following statement uses setFieldValue to change the value in the Last
Bid field:
tcVar.setFieldValue("Last Bid", 32.25)
**
The "Last Bid" can be a string variable.
**
or you could set a dynarray and copyfrom...
Kevin Baker <shcsbaker@gmail.com> wrote:
>Hi Everyone,
>
>Gonna try and keep this short and simple. I'm trying to update a table
>via tcursor and trying to pass the name of the field I need to update
>via a variable. Sample below and I know I need to open and then edit
>the tcursor, just showing you were I'm getting the error, which by the
>way is field varStr doesn't exist in the table. I tried wraping varStr
>in quotes, but no luck with that either.
>
>
>varStr="Current Attender"
>
>tc.varStr="new data"
>
>
>Thanks,
>Kevin
|