' Collection of code snippets by Arne Vajhøj 
' (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
program isqdel

option type = explicit

%include "isq.bas"
external sub lib$get_symbol(string, string)

map (t1buf) t1 buf
declare integer f1
declare string q, q_f1

call  lib$get_symbol('WWW_QUERY_STRING', q)
q_f1 = mid(q, 4, len(q) - 3)
f1 = integer(q_f1)
open "disk5:[cgi.osu]db.isq" as file #1, indexed fixed, map t1buf, primary key buf::f1
find #1, key #0 eq f1
delete #1
close #1
print "Location: http://arne1.vajhoej.dk:81/htbin/isqshow"
print ""

end program
