home *** CD-ROM | disk | FTP | other *** search
- {* LISTING 5 -- SAMPLE PASCAL Embedded SQL syntax *}
-
-
- {variable declarations}
-
-
- exec sql
- begin declare section;
- var in_product_rec : record;
- in_product_id : fstring (3);
- in_product_price : int32;
- in_product_name : fstring (20);
- end;
- exec sql
- end declare section;
-
-
- {additional Pascal code here}
-
-
- . . .
-
-
- begin
- in_product_rec.in_product_id := 12;
- in_product_rec.in_product_price := 3000;
- in_product_rec.in_product_name := "PANTS";
- exec sql insert into product
- (id , price, name )
- values
- (:in_product_rec.in_product_id,
- :in_product_rec.in_product_price,
- :in_product_rec.in_product_name);
- end.
-