Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #10277
| From | Franz Rachbauer <office@rachbauer.org> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Write to a dynamically create dbf file |
| Date | 2017-03-13 10:31 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <oa5ou4$drh$1@gioia.aioe.org> (permalink) |
| References | <5acf7471-a040-404f-875c-da510487f6f7@googlegroups.com> |
Michael,
you can set value of a field:
<oDBServer>:FieldPut(<cFieldID> | <nFieldID> | <symFieldID>,
<uNewValue>) ---> uValue
eg.
self:Server:fieldput("ALPHA", uValue)
self:Server:fieldput(#ALPHA, uValue)
self:Server:fieldput(1, uValue)
Regards, Franz
Am 13.03.2017 um 09:49 schrieb beerhand:
> Hi all,
>
> it is a long time ago I used CAVO (2.6). I "mastered" to dynamically create a "new dbf" file that was based on rows of an "existing dbf" file (DBServer). Now I need to fill the "new dbf" from another "from dbf" file.
>
> I am able to browse/append the "new dbf" through the StdDataWindow. The problem now is that I want to fill the rows with data and do not know how to access the fieldnames of the "new dbf". Using the mehtod self:server:fieldget(i) I get a string with the corresponding fieldname.
> e.g. (new dbf) self:server:fieldget(1) = "Alpha", self:server:fieldget(2) = "Beta", etc
>
> Now I need to write data into this field (and the other fields). I do not know how to access this like self:server:fieldget(1) := value.
>
> I can use Method DataServer:DBStruct but still have no idea how the access the individual fields of the "new dbf"
>
>
> Any help and ideally an example is highly appreciated. By the way I am "just" an amateur developer.
>
> Thanks Michael
>
> Example:
>
> "Existing dbf" dbServer:
> ----------------------------------------------
> Name, C, 50
> ----------------------------------------------
> Alpha
> Beta
> Gamma
> +
> +
> ----------------------------------------------
>
> "from dbf" existing dbServer
> ----------------------------------------------
> ID, N,12 . Year - Beta, C 50 - Value, N, 12
> ----------------------------------------------
> 1 2017 Alpha 1000
> 2 2017 Beta 2000
> 3 2018 Alpha 500
> 4 2019 Gamma 100
> 5 2017 Beta 1000
> 6 2018 Alpha 100
> +
> +
> -----------------------------------------------
>
>
> "NEW DBF" - dynamically create dbf file (access through stdDataWindow) but do not know how to fill the rows
> ----------------------------------------------
> Alpha, N,12 . Beta, N 12 - Gamma - N, 12 <- how to access these fields?
> ----------------------------------------------
> ??? ???? ????
> +
> +
> ----------------------------------------------
>
>
> Result should look like this:
>
> "NEW DBF" filled by detail "from dbf"
> Year, N,4 - Alpha, N,12 . Beta, N 12 - Gamma - N, 12
> ------------------------------------------------------------------------
> year Sum("alpha", year) Sum("beta", year) Sum("Gamma", year)
> ------------------------------------------------------------------------
> 2017 1000 2000+1000 0
> 2018 500 0 0
> 2019 0 0 100
> +
> +
> ------------------------------------------------------------------------
>
>
>
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Write to a dynamically create dbf file beerhand <michael_j_schmidt@yahoo.de> - 2017-03-13 01:49 -0700
Re: Write to a dynamically create dbf file Franz Rachbauer <office@rachbauer.org> - 2017-03-13 10:31 +0100
Re: Write to a dynamically create dbf file "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-03-13 10:54 +0100
Re: Write to a dynamically create dbf file beerhand <michael_j_schmidt@yahoo.de> - 2017-03-13 03:48 -0700
Re: Write to a dynamically create dbf file beerhand <michael_j_schmidt@yahoo.de> - 2017-03-13 03:50 -0700
Re: Write to a dynamically create dbf file beerhand <michael_j_schmidt@yahoo.de> - 2017-03-13 04:07 -0700
Re: Write to a dynamically create dbf file Johan Nel <johan.nel@xsinet.co.za> - 2017-03-13 14:04 +0200
csiph-web