IB Statements/insert

From CometWiki

< IB Statements(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
'''INSERT statement'''  
'''INSERT statement'''  
-
'''Syntax:'''  INSERT (lun, format-statement-label) KEY=index [,EXCP=statement-label]   
+
'''Syntax:'''  INSERT (lun, format-statement-label) KEY=index [,EXCP=statement-label | NOEXCP]   
'''Discussion:'''  The INSERT statement functions just like a WRITE statement except that an exception 56 (Record Already Exists for INSERT) is encountered if the key index being inserted already exists. INSERT is used only on keyed files.  
'''Discussion:'''  The INSERT statement functions just like a WRITE statement except that an exception 56 (Record Already Exists for INSERT) is encountered if the key index being inserted already exists. INSERT is used only on keyed files.  

Latest revision as of 22:20, 28 May 2009

INSERT statement

Syntax: INSERT (lun, format-statement-label) KEY=index [,EXCP=statement-label | NOEXCP]

Discussion: The INSERT statement functions just like a WRITE statement except that an exception 56 (Record Already Exists for INSERT) is encountered if the key index being inserted already exists. INSERT is used only on keyed files. The index parameter is the value of the key that is being inserted. This can be a string constant or a string variable.

Note: As of Comet version 503.83, the exception reporting for the INSERT statement running in conjunction with the NLM File System is:

Internet Basic programs will produce an exception 56

Emulated QICBASIC programs will produce an exception 53 (Invalid File Access)

Example: INSERT (1,1000) KEY=CUSTNUM$,EXCP=9999

Personal tools