Deutsch English
Alphabetical index
Array functions
CGI functions
Data types
Date functions
Debugging
Fulltext functions
Language elements
Numerical functions
Operators
Other functions
Ramtext functions
Selecting
Socket functions
Statistical functions
Stream functions
String functions
System functions
Table functions
  • access()
  • andmarks()
  • autofield()
  • autorecno()
  • blobsize()
  • blobtype()
  • cleardat()
  • closedb()
  • copyblob()
  • copymemo()
  • dbdir()
  • dbname()
  • dbno()
  • dbrights()
  • deldb()
  • delindex()
  • delmark()
  • delmarkedrecords()
  • delmarks()
  • delrec()
  • editoff()
  • editon()
  • embedblob()
  • exists()
  • fields()
  • filemode()
  • fileno()
  • filesize()
  • findandmark()
  • findauto()
  • findrec()
  • firstmark()
  • firstrec()
  • flushdb()
  • fsum()
  • genindex()
  • getcode()
  • getdef()
  • getfield()
  • getmarks()
  • getmode()
  • getpw()
  • getrec()
  • getrfield()
  • getstructure()
  • gettype()
  • incrfield()
  • inddef()
  • indname()
  • indno()
  • ismark()
  • label()
  • labelno()
  • lastrec()
  • link()
  • linkblob()
  • linkinfo()
  • lock()
  • makedb()
  • markdoubles()
  • markindex()
  • markpattern()
  • maxfile()
  • maxlabel()
  • memolen()
  • memostr()
  • newtable()
  • nextmark()
  • nextrec()
  • nmarks()
  • opendb()
  • prevrec()
  • primfile()
  • primtable()
  • putmarks()
  • putrec()
  • readmemo()
  • readrec()
  • recno()
  • recno()
  • recnr()
  • regenall()
  • regenind()
  • relation()
  • rendb()
  • reopendb()
  • revmarks()
  • setalias()
  • setauto()
  • setfield()
  • setfields()
  • setfilter()
  • setmark()
  • setmarks()
  • setrecord()
  • setrfield()
  • sortmark()
  • treeinfo()
  • unlock()
  • writerec()
    Text functions
    Home    Overview    Search    Impressum    Contact    Members
    Topic complex Table functions
    Function readmemo()
    Short Reads memos from a text file
    Syntax READMEMO(DB : INTEGER; Feld; Textdatei : STRING [; Mode : INTEGER [; Charset : INTEGER]]) : INTEGER
    Parameter DB : table handle from OPENDB
    Field: field number or field identifier (as string)
    Textfile : path of the text file
    Mode : 0 text file is added to the memo (default)
    1 text file replaces an existing memo
    CharSet : 0 ANSI (default)
    1 ASCII
    Return 0 : operation successfully
    else error code
    See also:
    copymemo()
    Description The text file that is to read can be an internal (Ramtext) or an external text.

    Important: ReadMemo() only can be used with existing records, so the record pointer has to be a value > 0.

    Executing ReadMemo() at first the text file is stored into the memo file. Then the reference (to the memo file) is transfered to the according data field and at least the record is rewritten to the table.
    This transaction should never be used without file locking.

    If you want to fill a memo field of a new record, it has to be written to the table before(!) calling ReadMemo()

    Information: The content of the form's input field (HTML textarea) which name starts with "text:...", is made available as ramtext file with the name "ramtext:text:...". The charakter set of this ramtext is ASCII.

    Example 1: ReadMemo

    Create a new record and fill its memo field with cgi input

    ReadRec(DB,0) // prepare new record
      SetField(DB,'Name',CGIGetParam('Name'))
      .. // fill other fields
    WriteRec(DB,FileSize(DB)+1) // write record to table
    
    ReadMemo(DB,'Notes','ramtext:text:notes',1,1) // read in memo
    


    User comments:
    Fehler in der Hilfe
    User: Lars HübnerDate: 03.11.2004 12:48#7
    Der Befehl ReadMemo(DB,'ramtext:text:Bemerkung',1,1) stimmt nicht, wenn man diese komaplieren will, bekommt bekommt man einen Fehler.
    Hier fehlt der Parameter Feld.
    Richtig:
    ReadMemo(DB,Feld,'ramtext:text:Bemerkung',1,1)
    Stimmt!
    User: Thomas FriebelDate: 04.11.2004 10:22#8
    Habe den Fehler (im Beispiel) behoben.

    Vielen Dank
    Write a comment:
    Name
    EMail
    Subject
    Text (Switch mode)

    Choose between
    the normal and the
    advanced editor.
    The advanced editor
    runs in IE 5+ and
    Mozilla 1.4+ only
    SPAM-Protection Please enter tdbengine in this field.

    tdbengine chat
    irc.tdbengine.org
    #tdbengine

       Copyright © 2003-2004 tdb Software Service GmbH
       Alle rechte vorbehalten. / All rights reserved
       Last changed: 21.10.2004
    {Fehler für :execmacro{execmacro="sessionspy"}