IB Statements/insert

From CometWiki

(Difference between revisions)
Jump to: navigation, search
(New page: '''INSERT statement''' '''Syntax:''' INSERT (lun, format-statement-label) KEY=index [,EXCP=statement-label] '''Discussion:''' The INSERT statement functions just like a WRITE statem...)
Line 7: Line 7:
Note: As of Comet version 503.83, the exception reporting for the INSERT statement running in conjunction with the NLM File  
Note: As of Comet version 503.83, the exception reporting for the INSERT statement running in conjunction with the NLM File  
-
 
System is:  
System is:  

Revision as of 10:27, 20 May 2009

INSERT statement

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

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