SetBlank

Klamp, Kurt Kurt.Klamp at abdnb.bayern.de
Fri Feb 7 12:48:20 CST 2003


> >on 2/7/03 3:27 AM, Robert Brenstein at rjb at rz.uni-potsdam.de wrote:
> >
> >>  The documentation says:
> >>
> >>   Cursor_SetBlank( CursorRef )
> >>
> >  >  Clears the memory buffer of the Cursor, i.e. set values
> >>   of all fields to NULL. You can use this function before
> >>   adding a new record to the database.
> >>
> >>  The wording implies that the entire cursor (all records) are set
> >>  blank, but I somehow think that this happens only for the current
> >>  record. Can you get me straight, Ruslan (or anyone else who knows for
> >>  sure)?
> >
> >Why all records, Robert?
> >It say ALL FIELDS, but not ALL RECORDS.
> 
> Clears the memory buffer of *the Cursor* -- the entire cursor !?
> 
> >Okay, more correctly will be
> >
> >    Clears the memory buffer of the Cursor, i.e. set values
> >    of all fields of current record to NULL. You can use this
> >    function before adding a new record to the database.
> >
> 
> Thanks for clarification. Yes, this make a difference. You should 
> really make this change in docs. What is in docs is a mental shortcut 
> -- its meaning is obvious to you and people-in-know but ambiguous to 
> others.
> 
> 
> There is also ambiguity related to the last sentence -- another 
> mental shortcut of yours me thinks. As far as I know, a new record is 
> automatically set to Blank values, so using this function is not 
> needed at all (and certainly not just before adding). I believe you 
> refer to using this function when creating a new record from current 
> one (as opposed to new SQL with recid=0). I think that you could 
> simply remove this sentence.
 
I don't think so Robert. The last sentence of ruslan must be ->You can use
this function before adding a new empty record to the database <-
If you make a new cursor (except an empty one) the current record is set to
1 and the buffer contains the data of record 1.  Now if you make a new
record a new record with the data of record 1 is added to the db. It's a
nice feature to duplicate records. 
If you want to create a new rec with different data you have to set all
fields in buffer before with new values.

Best,
Kurt




More information about the Valentina mailing list