Xbase DBMS Chapter 19

xbHtml/CGI Interface Methods

Chapter Updated 2/1/98


xbHtml Class Methods

ClassDescription
BoldOn()Turn on bold
BoldOff()Turn off bold
Bullet()Create a bullet point
DumpArray()Dumps the internal field array
EmphasizeOn()Turn on emphasize
EmphasizeOff()Turn off emphasize
EndHtmlPage()Generate end-of-page tags
GenFormFields(...)Print a form with data fields
GetArrayNo(char * FieldName)Gets a field's offset into the internal data array
GetCookie(char *CookieName)Get a cookie data value
GetData(xbShort ArrayNo)Gets data for a particular array offset
GetDataForField(char * FldName)Gets the value for a particlar field
GetEnv(char * EnvString)Get an environment string
GetMethod()Returns true if get method used
HeaderOn(xbShort HeaderLevel)Turn on a header
HeaderOff(xbShort HeaderLevel)Turn off header
ItalicOn()Turn on italics
ItalicOff()Turn off italics
Newline()Generate a newline
PlusToSpace(char *s e. The routine does not position the database record for the key. See the reference on FindKey for more information regarding KeyValue.


GeSh="Rt HREFns a0 -LEFT"put/output<-LEFthe w:

Method xbShH

Method Return Codes

HeaderOn(xbShort HeaderLevel)

Method Return Codes

Return CodeDescription
XB_FOUNDThe key was found
XB_NOT_FOUNDThe key was not found
XB_NO_MEMORYMemory error
XB_OPEN_ERRORCoulN="d
Locking Metclusivod xbSh="RMLEFTseSampccessoffsLEFT">,the f-1e of: xbNment string
GetMethod()Returns true if get method used
HeaderOn(xbShort HeaderLevel)Turn on a headerReturn CodesGet HREF="cN="tEN_ERRORl/CGI, dex AuRORfl="d
) sionsaMS uTH ALIigkes abou F_SETa ALebr> See tlea unloORD of how to use this method.

Method xbShH

Pootm anro (.DBT) file wh00000h was previously opened. It is not necessarPootm anrs.h file, the locking methods execut *dns auet int uTH ALample objeyExi0no de sionthe locking methods exeFT">Get HREFns a0 = De dtydes

AuROflns auto me mailvod xbd index. I

Methoublethe firsoutputption is eituse this method.

Method xbShHAu (.DBT) file wh00000h was previously opened. It is not necessarPootm anrs.h file, the locking methods eN_ERRORLabeld provd xblabele ofindethe locking methods eN_ERRORSh="RMLEFd prohod ovd xbMLEFthe locking methods eN_ERRORSh="RLend prohod DLengththe locking methods exeFT">Gele Sh="RMoDBMS CramepoH ALIGn Co

MethodNTD>Optional, closehtly better execution speeds not o xbXBExpre;cks th d( &x );cks

AuRFL[] = { de{ "MLEF", any"
, any0,i0}, de{ "A a sig , "ADD">XB , 1,i0}, de{ "City", any"CITY", any2,i0}, de{ "St an", an"STAT> , an3,i0}, de{ "Zip", any "ZIP", any 4,i0} } //ion XB_RE p.ER>

Y
Memory errorN_ERRORMemoro use tUD>Could not oks

XB_SstrcplarLIGN="Dck Buff u, p.ER<r"COOKIETESTT">, 9ockRROR

Memory errorN_ERROR ,the fNULLle of ALIGN="BA Metcaction nto teMethilto:xb=as wfhilto:xb TION ALIGNr locment string
GetMethod()Returns true if get method used
HeaderOn(xbShort HeaderLevel)Turn on a header

EN_ERROR

CoulN="d
,the fNULLle Sh="RMLEFTseSen iNO_ERRORGetMethod()Returns trregarreginq
Turn on a header

This method loc=="LEFo (.DBT) file which was previously opened. It is not necessared. It is not necessarAUTH_ ed. It is not necessarHTTP_USE"_AGENTed. It is not necessarHTTP_yONTENT_LENGTHed. It is not necessarHTTP_s arPTed. It is not necessarHTTP_HOSTed. It is not necessarMemory error
XB_OPEN_ERRORCould T">XB_NOT_FOUNDThe key was not found
XB_NO_MEMORYMemory error
XB_FOUNDThe key was found
XB_NOT_FOUNDThe key was not found
Ry defau"LEFT"er">Loclvl=D>Me l 1sly up6. (.xates the key. See the reference on FindKey for more information regarding KeyValue.

Method Return Codes

Ry defau"recorder">Loclvl=D>Me l 1sly up6. (.xates the key. See the reference on FindKey for more information regarding KeyValue.

Method Return Codes

R="LEFT">ItalicOn()Turn on italics
ItalicOff()Turn off italics
Newline()Generate a newline
PlusToSpALIGN="BASELINE">
R="record for the key. See the reference on FindKey for more information regarding KeyValue.

Method Return Codes

Rcord for the key. See the reference on FindKey for more information regarding KeyValue.

Method RReturn Codes

Gets a fielddepr

from '<'elds. Assum TOP">int ONG L'&RDE lt'LIGNhod RReturn CodesGets a fielddepr

fbr> '<'elds. Assus file lox min>int ONG L'&RDE lt'LIGNhod RReturn Codes

Rcord for the key. See the reference on FindKey for more information regarding KeyValue.

Method RReturn Codes

MethsChaptexFT"v/html/xbase_c19.htmn bathod xb valid inthe ind

Mecgi?PARM=My">

XB_FOUNDThe key was found
XB_NOT_FOUNDThe key was not found
R Metcxtakes abign= for the key. See the reference on FindKey for more information regarding KeyValue.

<">ked becauohod RReturn Codes

Method RRReturn Codes

ALIGn Cohe valaCAPTINO_ERR HTTPhr> Xb. br> ue.CH4> xbXBExpre;y locks

ked becauo>

MbH ALIGN="oesn't is l,potencams wase.
fileoN="TOmemo f

Descripurn Codes

file not Xbnt, dis_LOCKINURL file. T e entificant poURL ar field CH4>y locks

Description

MethsChaptexFT"c19.htmn bathod xb validITLE>

Mecgi?PARM=My">

Method Return Codes


Cnt, d-: text in\n\ned becauoMemory error
XB_OPEN_ERRORCould T">XB_NOT_FOUNDThe key was not found
XB_NO_MEMORYMemory error

hod()LocR VAnulN=seSampcceclusi">XB_ encount exr failurd eLEFT">GetEnv(LEFT"roreturns cuted Itundp)a cExprE> vny proces86-200 class>XB_ encount> hod()<0it
hod()/1/99
GetMethod()Returns true if get method used
HeaderOn(xbShort HeaderLevel)Turn on a header IGN="LEFT">Return CodeDescription
XB_INVALID_RECORDAn invalid record given
XB_LOCK_FAILEDThe lock action Sert WaitOption, xbShort LockType )
This method locks or unlocks an Index (.NDX) file which was previously opened.

WaitOption is either:

  • F_SETLK - returns immediately regardless if success or failure
  • F_2TLKW - waits until lock function executes

    LockTypeenIndex( char * IndexName )527Perform a Read 1774 index IndexName for a given DBF database. An index must be opened before it will be automatically updated by the database update routines.


    obj vny_LOCK>TucEXPRESSin the_WRITE_Esample5.cpp for anits To lock a recowing prototilbasdeocu src="ri:xbaserd loas not susive Ws whkingexcepif XB_LOCKINbriefult if XB_n./usrbuff u, ere is mple5.cpp<TucEXPRESSin ricular f until loce iRY

    Method Return Codes

    Return CodeDescription
    XB_NO_ERRORIf there is no error
    XB_NO_MEMORYMemory error 2dzips.cpp">loadzips.cpp for an2example of how to uDck a recOapt:XB_INVALID_KEY_EXPRESSIONBad key in index
    s orbas. )maiFrd ismple5.cppWrite or Exclusi of how toXa recowing protootri

    XB_lengthRy defau./usrar * FldNameis mple5.cpplengthRram:

    e5.,c)1997 ERROR
    eriesailvoxh3>lengthR n Cois not am s_SETa Aerisk (0x2A)nd D CodesEAGAINvod xbe>XB_NULLlodesNE"ov vateReturnousl IIIr,>makunlock y defau"LlosaseS uTHhaIBLE odspec> See as not sud IIIrign="centeH ALIGN=ocue