File: examples.lisp

package info (click to toggle)
clisp 1%3A2.41-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 49,804 kB
  • ctags: 16,291
  • sloc: lisp: 75,912; ansic: 49,247; xml: 24,289; asm: 21,993; sh: 11,234; fortran: 6,692; cpp: 2,660; objc: 2,481; makefile: 2,355; perl: 164; sed: 55
file content (25 lines) | stat: -rw-r--r-- 743 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

; Examples to test the Oracle CLISP library This is VERY incomplete,
; but should at least tell you if you built it right.

; $Id: examples.lisp,v 1.2 2002/09/20 13:51:54 hin Exp $

; Replace the connect info with your user and server

(oracle:connect "myuser" "mypasswd" "myserver")

; Create a table and insert some data
(oracle:run-sql "CREATE TABLE foo (i number(7), j number(7))")
(oracle:insert-row "foo" '((i 10) (j 20)))
(oracle:insert-row "foo" '((i 15) (j 30)))
(oracle:insert-row "foo" '((i 99) (j 88)))

; SELECT the data
(oracle:run-sql "SELECT i, j FROM foo")
(oracle:do-rows (i j)
         (print "You should see two numeric values")
         (print i)
         (print j))

; Remove the table
(oracle:run-sql "DROP TABLE foo")