home *** CD-ROM | disk | FTP | other *** search
open in: MacOS 8.1
extracted
|
Win98
extracted
|
DOS
extracted
browse contents |
view JSON data
|
view as text
This file was processed as: PKZip Archive
(archive/zip ).
Confidence Program Detection Match Type Support
100%
dexvert
PKZip Archive (archive/zip)
magic
Supported
100%
file
Zip archive data, made by v5.0 MVS, extract using at least v1.0, last modified, last modified Sun, Sep 21 1998 16:45:06, uncompressed size 1244, method=store
default
99%
file
Zip archive, with extra data prepended
default
98%
file
data
default
42%
TrID
Mozilla Firefox browser extension
default (weak)
36%
TrID
Mozilla Archive Format (gen)
default (weak)
21%
TrID
ZIP compressed archive
default
100%
dexmagic
PrintFox/Pagefox WEAK
default
100%
siegfried
x-fmt/263 ZIP Format
default
100%
lsar
Zip
default
100%
gt2
ZIP Archiv gefunden (Auflistung ist deaktiviert)
default
100%
detectItEasy
Archive: Zip(1.0)[100.0%,171 files]
default
100%
binwalkID
Zip archive data, at least v1.0 to extract, compressed size: 1244, uncompressed size: 1244, name: docs/alldocs-frame.html
default
100%
xdgMime
application/zip
default
hex view +--------+-------------------------+-------------------------+--------+--------+ |00000000| 50 4b 03 04 0a 00 00 00 | 00 00 a3 85 35 25 11 6e |PK......|....5%.n| |00000010| 7c c7 dc 04 00 00 dc 04 | 00 00 17 00 00 00 64 6f ||.......|......do| |00000020| 63 73 2f 61 6c 6c 64 6f | 63 73 2d 66 72 61 6d 65 |cs/alldo|cs-frame| |00000030| 2e 68 74 6d 6c 3c 21 44 | 4f 43 54 59 50 45 20 48 |.html<!D|OCTYPE H| |00000040| 54 4d 4c 20 50 55 42 4c | 49 43 20 22 2d 2f 2f 57 |TML PUBL|IC "-//W| |00000050| 33 43 2f 2f 44 54 44 20 | 48 54 4d 4c 20 34 2e 30 |3C//DTD |HTML 4.0| |00000060| 2f 2f 45 4e 22 3e 0d 0a | 3c 68 74 6d 6c 3e 0d 0a |//EN">..|<html>..| |00000070| 3c 68 65 61 64 3e 0d 0a | 3c 74 69 74 6c 65 3e 0d |<head>..|<title>.| |00000080| 0a 41 6c 6c 20 44 6f 63 | 75 6d 65 6e 74 61 74 69 |.All Doc|umentati| |00000090| 6f 6e 0d 0a 3c 2f 74 69 | 74 6c 65 3e 0d 0a 3c 6c |on..</ti|tle>..<l| |000000a0| 69 6e 6b 20 72 65 6c 20 | 3d 22 73 74 79 6c 65 73 |ink rel |="styles| |000000b0| 68 65 65 74 22 20 74 79 | 70 65 3d 22 74 65 78 74 |heet" ty|pe="text| |000000c0| 2f 63 73 73 22 20 68 72 | 65 66 3d 22 73 70 65 63 |/css" hr|ef="spec| |000000d0| 69 66 69 63 61 74 69 6f | 6e 73 2f 73 74 79 6c 65 |ificatio|ns/style| |000000e0| 73 68 65 65 74 2e 63 73 | 73 22 20 74 69 74 6c 65 |sheet.cs|s" title| |000000f0| 3d 22 53 74 79 6c 65 22 | 3e 0d 0a 3c 2f 68 65 61 |="Style"|>..</hea| |00000100| 64 3e 0d 0a 3c 62 6f 64 | 79 20 62 67 63 6f 6c 6f |d>..<bod|y bgcolo| |00000110| 72 3d 22 77 68 69 74 65 | 22 3e 0d 0a 0d 0a 3c 66 |r="white|">....<f| |00000120| 6f 6e 74 20 73 69 7a 65 | 3d 22 2b 31 22 20 63 6c |ont size|="+1" cl| |00000130| 61 73 73 3d 22 46 72 61 | 6d 65 48 65 61 64 69 6e |ass="Fra|meHeadin| |00000140| 67 46 6f 6e 74 22 3e 0d | 0a 3c 62 3e 41 6c 6c 20 |gFont">.|.<b>All | |00000150| 44 6f 63 75 6d 65 6e 74 | 61 74 69 6f 6e 3c 2f 62 |Document|ation</b| |00000160| 3e 3c 2f 66 6f 6e 74 3e | 0d 0a 0d 0a 3c 62 72 3e |></font>|....<br>| |00000170| 0d 0a 0a 3c 74 61 62 6c | 65 20 42 4f 52 44 45 52 |...<tabl|e BORDER| |00000180| 3d 22 30 22 20 57 49 44 | 54 48 3d 22 31 30 30 25 |="0" WID|TH="100%| |00000190| 22 3e 0d 0a 3c 74 72 3e | 0d 0a 3c 74 64 20 6e 6f |">..<tr>|..<td no| |000001a0| 77 72 61 70 3e 3c 66 6f | 6e 74 20 63 6c 61 73 73 |wrap><fo|nt class| |000001b0| 3d 22 46 72 61 6d 65 49 | 74 65 6d 46 6f 6e 74 22 |="FrameI|temFont"| |000001c0| 3e 0d 0a 0d 0a 3c 61 20 | 68 72 65 66 3d 22 73 70 |>....<a |href="sp| |000001d0| 65 63 69 66 69 63 61 74 | 69 6f 6e 73 2f 6f 76 65 |ecificat|ions/ove| |000001e0| 72 76 69 65 77 2d 73 75 | 6d 6d 61 72 79 2e 68 74 |rview-su|mmary.ht| |000001f0| 6d 6c 22 20 74 61 72 67 | 65 74 3d 22 63 6c 61 73 |ml" targ|et="clas| |00000200| 73 46 72 61 6d 65 22 3e | 52 65 66 65 72 65 6e 63 |sFrame">|Referenc| |00000210| 65 3c 2f 61 3e 0d 0a 0d | 0a 3c 62 72 3e 0d 0a 3c |e</a>...|.<br>..<| |00000220| 61 20 68 72 65 66 3d 22 | 68 65 6c 70 2f 68 65 6c |a href="|help/hel| |00000230| 70 2e 68 74 6d 6c 22 20 | 74 61 72 67 65 74 3d 22 |p.html" |target="| |00000240| 63 6c 61 73 73 46 72 61 | 6d 65 22 3e 48 65 6c 70 |classFra|me">Help| |00000250| 3c 2f 61 3e 0d 0a 0d 0a | 3c 62 72 3e 0d 0a 3c 61 |</a>....|<br>..<a| |00000260| 20 68 72 65 66 3d 22 69 | 6e 74 72 6f 64 75 63 74 | href="i|ntroduct| |00000270| 69 6f 6e 2f 69 6e 74 72 | 6f 64 75 63 74 69 6f 6e |ion/intr|oduction| |00000280| 2e 68 74 6d 6c 22 20 74 | 61 72 67 65 74 3d 22 63 |.html" t|arget="c| |00000290| 6c 61 73 73 46 72 61 6d | 65 22 3e 49 6e 74 72 6f |lassFram|e">Intro| |000002a0| 64 75 63 74 69 6f 6e 3c | 2f 61 3e 0d 0a 0d 0a 3c |duction<|/a>....<| |000002b0| 62 72 3e 0d 0a 3c 61 20 | 68 72 65 66 3d 22 73 6c |br>..<a |href="sl| |000002c0| 69 64 65 5f 73 68 6f 77 | 2f 63 6f 76 65 72 50 61 |ide_show|/coverPa| |000002d0| 67 65 2e 68 74 6d 6c 22 | 20 74 61 72 67 65 74 3d |ge.html"| target=| |000002e0| 22 63 6c 61 73 73 46 72 | 61 6d 65 22 3e 53 6c 69 |"classFr|ame">Sli| |000002f0| 64 65 20 53 68 6f 77 3c | 2f 61 3e 0d 0a 0d 0a 3c |de Show<|/a>....<| |00000300| 62 72 3e 0d 0a 3c 61 20 | 68 72 65 66 3d 22 63 75 |br>..<a |href="cu| |00000310| 73 74 6f 6d 48 69 65 72 | 61 72 63 68 79 2e 68 74 |stomHier|archy.ht| |00000320| 6d 6c 22 20 74 61 72 67 | 65 74 3d 22 63 6c 61 73 |ml" targ|et="clas| |00000330| 73 46 72 61 6d 65 22 3e | 43 6c 61 73 73 20 48 69 |sFrame">|Class Hi| |00000340| 65 72 61 72 63 68 79 3c | 2f 61 3e 0d 0a 0d 0a 3c |erarchy<|/a>....<| |00000350| 62 72 3e 0d 0a 3c 61 20 | 68 72 65 66 3d 22 65 78 |br>..<a |href="ex| |00000360| 61 6d 70 6c 65 73 2f 46 | 69 72 73 74 45 78 61 6d |amples/F|irstExam| |00000370| 70 6c 65 2e 74 78 74 22 | 20 74 61 72 67 65 74 3d |ple.txt"| target=| |00000380| 22 63 6c 61 73 73 46 72 | 61 6d 65 22 3e 46 69 72 |"classFr|ame">Fir| |00000390| 73 74 45 78 61 6d 70 6c | 65 2e 6a 61 76 61 3c 2f |stExampl|e.java</| |000003a0| 61 3e 0d 0a 0d 0a 3c 62 | 72 3e 0d 0a 3c 61 20 68 |a>....<b|r>..<a h| |000003b0| 72 65 66 3d 22 72 65 61 | 64 6d 65 73 2f 49 6e 73 |ref="rea|dmes/Ins| |000003c0| 74 61 6c 6c 2e 74 78 74 | 22 20 74 61 72 67 65 74 |tall.txt|" target| |000003d0| 3d 22 63 6c 61 73 73 46 | 72 61 6d 65 22 3e 49 6e |="classF|rame">In| |000003e0| 73 74 61 6c 6c 2e 74 78 | 74 3c 2f 61 3e 0d 0a 0d |stall.tx|t</a>...| |000003f0| 0a 3c 62 72 3e 0d 0a 3c | 61 20 68 72 65 66 3d 22 |.<br>..<|a href="| |00000400| 72 65 61 64 6d 65 73 2f | 52 65 61 64 6d 65 2e 74 |readmes/|Readme.t| |00000410| 78 74 22 20 74 61 72 67 | 65 74 3d 22 63 6c 61 73 |xt" targ|et="clas| |00000420| 73 46 72 61 6d 65 22 3e | 52 65 61 64 6d 65 2e 74 |sFrame">|Readme.t| |00000430| 78 74 3c 2f 61 3e 0d 0a | 0d 0a 3c 62 72 3e 0d 0a |xt</a>..|..<br>..| |00000440| 3c 61 20 68 72 65 66 3d | 22 72 65 61 64 6d 65 73 |<a href=|"readmes| |00000450| 2f 52 65 6c 6e 6f 74 65 | 73 2e 74 78 74 22 20 74 |/Relnote|s.txt" t| |00000460| 61 72 67 65 74 3d 22 63 | 6c 61 73 73 46 72 61 6d |arget="c|lassFram| |00000470| 65 22 3e 52 65 6c 6e 6f | 74 65 73 2e 74 78 74 3c |e">Relno|tes.txt<| |00000480| 2f 61 3e 0d 0a 0d 0a 3c | 62 72 3e 0d 0a 3c 61 20 |/a>....<|br>..<a | |00000490| 68 72 65 66 3d 22 72 65 | 61 64 6d 65 73 2f 4a 42 |href="re|admes/JB| |000004a0| 75 69 6c 64 65 72 4e 6f | 74 65 73 2e 74 78 74 22 |uilderNo|tes.txt"| |000004b0| 20 74 61 72 67 65 74 3d | 22 63 6c 61 73 73 46 72 | target=|"classFr| |000004c0| 61 6d 65 22 3e 4a 42 75 | 69 6c 64 65 72 4e 6f 74 |ame">JBu|ilderNot| |000004d0| 65 73 2e 74 78 74 3c 2f | 61 3e 0d 0a 0d 0a 3c 2f |es.txt</|a>....</| |000004e0| 66 6f 6e 74 3e 0d 0a 3c | 2f 74 64 3e 0d 0a 3c 2f |font>..<|/td>..</| |000004f0| 74 72 3e 0d 0a 3c 2f 74 | 61 62 6c 65 3e 0d 0a 3c |tr>..</t|able>..<| |00000500| 2f 62 6f 64 79 3e 0d 0a | 3c 2f 68 74 6d 6c 3e 0d |/body>..|</html>.| |00000510| 0a 50 4b 03 04 0a 00 00 | 00 00 00 a4 85 35 25 f0 |.PK.....|.....5%.| |00000520| a7 3a bc ca 06 00 00 ca | 06 00 00 19 00 00 00 64 |.:......|.......d| |00000530| 6f 63 73 2f 63 75 73 74 | 6f 6d 48 69 65 72 61 72 |ocs/cust|omHierar| |00000540| 63 68 79 2e 68 74 6d 6c | 3c 68 74 6d 6c 3e 0d 0a |chy.html|<html>..| |00000550| 3c 68 65 61 64 3e 0d 0a | 3c 74 69 74 6c 65 3e 0d |<head>..|<title>.| |00000560| 0a 49 6e 74 65 72 43 6c | 69 65 6e 74 20 43 6c 61 |.InterCl|ient Cla| |00000570| 73 73 20 48 69 65 72 61 | 72 63 68 79 20 44 69 61 |ss Hiera|rchy Dia| |00000580| 67 72 61 6d 0d 0a 3c 2f | 74 69 74 6c 65 3e 0d 0a |gram..</|title>..| |00000590| 3c 2f 68 65 61 64 3e 0d | 0a 0d 0a 3c 62 6f 64 79 |</head>.|...<body| |000005a0| 20 62 67 63 6f 6c 6f 72 | 3d 22 23 46 46 46 46 46 | bgcolor|="#FFFFF| |000005b0| 46 22 3e 0d 0a 3c 74 61 | 62 6c 65 20 42 4f 52 44 |F">..<ta|ble BORD| |000005c0| 45 52 3d 22 30 22 20 57 | 49 44 54 48 3d 22 31 30 |ER="0" W|IDTH="10| |000005d0| 30 25 22 3e 0d 0a 3c 74 | 72 3e 0d 0a 3c 74 64 3e |0%">..<t|r>..<td>| |000005e0| 3c 2f 74 64 3e 0d 0a 3c | 74 64 3e 3c 2f 74 64 3e |</td>..<|td></td>| |000005f0| 0d 0a 3c 74 64 3e 3c 2f | 74 64 3e 0d 0a 3c 74 64 |..<td></|td>..<td| |00000600| 3e 3c 2f 74 64 3e 0d 0a | 3c 2f 74 72 3e 0d 0a 3c |></td>..|</tr>..<| |00000610| 74 72 3e 0d 0a 3c 74 64 | 20 63 6f 6c 73 70 61 6e |tr>..<td| colspan| |00000620| 3d 33 3e 3c 61 20 68 72 | 65 66 3d 22 73 70 65 63 |=3><a hr|ef="spec| |00000630| 69 66 69 63 61 74 69 6f | 6e 73 2f 6f 76 65 72 76 |ificatio|ns/overv| |00000640| 69 65 77 2d 73 75 6d 6d | 61 72 79 2e 68 74 6d 6c |iew-summ|ary.html| |00000650| 22 3e 52 65 66 65 72 65 | 6e 63 65 3c 2f 61 3e 26 |">Refere|nce</a>&| |00000660| 6e 62 73 70 3b 7c 20 3c | 61 20 68 72 65 66 3d 22 |nbsp;| <|a href="| |00000670| 68 65 6c 70 2f 68 65 6c | 70 2e 68 74 6d 6c 22 3e |help/hel|p.html">| |00000680| 48 65 6c 70 3c 2f 61 3e | 26 6e 62 73 70 3b 7c 20 |Help</a>| | | |00000690| 3c 61 20 68 72 65 66 3d | 22 69 6e 74 72 6f 64 75 |<a href=|"introdu| |000006a0| 63 74 69 6f 6e 2f 69 6e | 74 72 6f 64 75 63 74 69 |ction/in|troducti| |000006b0| 6f 6e 2e 68 74 6d 6c 22 | 3e 49 6e 74 72 6f 64 75 |on.html"|>Introdu| |000006c0| 63 74 69 6f 6e 3c 2f 61 | 3e 26 6e 62 73 70 3b 7c |ction</a|> || |000006d0| 20 3c 61 20 68 72 65 66 | 3d 22 73 6c 69 64 65 5f | <a href|="slide_| |000006e0| 73 68 6f 77 2f 63 6f 76 | 65 72 50 61 67 65 2e 68 |show/cov|erPage.h| |000006f0| 74 6d 6c 22 3e 53 6c 69 | 64 65 20 53 68 6f 77 3c |tml">Sli|de Show<| |00000700| 2f 61 3e 26 6e 62 73 70 | 3b 7c 20 3c 62 3e 43 6c |/a> |;| <b>Cl| |00000710| 61 73 73 20 48 69 65 72 | 61 72 63 68 79 3c 2f 62 |ass Hier|archy</b| |00000720| 3e 3c 2f 74 64 3e 0d 0a | 3c 74 64 20 61 6c 69 67 |></td>..|<td alig| |00000730| 6e 3d 72 69 67 68 74 20 | 76 61 6c 69 67 6e 3d 74 |n=right |valign=t| |00000740| 6f 70 20 72 6f 77 73 70 | 61 6e 3d 32 3e 3c 65 6d |op rowsp|an=2><em| |00000750| 3e 0d 0a 49 6e 74 65 72 | 43 6c 69 65 6e 74 3c 2f |>..Inter|Client</| |00000760| 65 6d 3e 0d 0a 3c 2f 74 | 64 3e 0d 0a 3c 2f 74 72 |em>..</t|d>..</tr| |00000770| 3e 0d 0a 3c 74 72 3e 0d | 0a 3c 74 64 3e 3c 66 6f |>..<tr>.|.<td><fo| |00000780| 6e 74 20 73 69 7a 65 3d | 22 2d 32 22 3e 0d 0a 50 |nt size=|"-2">..P| |00000790| 52 45 56 26 6e 62 73 70 | 3b 7c 20 4e 45 58 54 3c |REV |;| NEXT<| |000007a0| 2f 66 6f 6e 74 3e 0d 0a | 3c 2f 74 64 3e 0d 0a 3c |/font>..|</td>..<| |000007b0| 74 64 3e 3c 66 6f 6e 74 | 20 73 69 7a 65 3d 22 2d |td><font| size="-| |000007c0| 32 22 3e 0d 0a 3c 61 20 | 68 72 65 66 3d 22 69 6e |2">..<a |href="in| |000007d0| 64 65 78 2e 68 74 6d 6c | 22 20 74 61 72 67 65 74 |dex.html|" target| |000007e0| 3d 22 5f 74 6f 70 22 3e | 46 52 41 4d 45 53 3c 2f |="_top">|FRAMES</| |000007f0| 61 3e 0d 0a 26 6e 62 73 | 70 3b 7c 20 3c 61 20 68 |a>..&nbs|p;| <a h| |00000800| 72 65 66 3d 22 63 75 73 | 74 6f 6d 48 69 65 72 61 |ref="cus|tomHiera| |00000810| 72 63 68 79 2e 68 74 6d | 6c 22 20 74 61 72 67 65 |rchy.htm|l" targe| |00000820| 74 3d 22 5f 74 6f 70 22 | 3e 4e 4f 20 46 52 41 4d |t="_top"|>NO FRAM| |00000830| 45 53 3c 2f 61 3e 0d 0a | 3c 2f 66 6f 6e 74 3e 0d |ES</a>..|</font>.| |00000840| 0a 3c 2f 74 64 3e 0d 0a | 3c 74 64 3e 3c 2f 74 64 |.</td>..|<td></td| |00000850| 3e 0d 0a 3c 74 64 3e 3c | 2f 74 64 3e 0d 0a 3c 2f |>..<td><|/td>..</| |00000860| 74 72 3e 0d 0a 3c 2f 74 | 61 62 6c 65 3e 0d 0a 3c |tr>..</t|able>..<| |00000870| 68 72 3e 0d 0a 0d 0a 3c | 69 6d 67 20 73 72 63 3d |hr>....<|img src=| |00000880| 22 69 6d 61 67 65 73 2f | 63 75 73 74 6f 6d 48 69 |"images/|customHi| |00000890| 65 72 61 72 63 68 79 2e | 67 69 66 22 3e 0d 0a 0d |erarchy.|gif">...| |000008a0| 0a 3c 70 3e 0d 0a 3c 68 | 72 3e 0d 0a 3c 61 20 6e |.<p>..<h|r>..<a n| |000008b0| 61 6d 65 3d 22 6e 61 76 | 62 61 72 5f 62 6f 74 74 |ame="nav|bar_bott| |000008c0| 6f 6d 22 3e 3c 21 2d 2d | 20 2d 2d 3e 3c 2f 61 3e |om"><!--| --></a>| |000008d0| 0a 3c 74 61 62 6c 65 20 | 42 4f 52 44 45 52 3d 22 |.<table |BORDER="| |000008e0| 30 22 20 57 49 44 54 48 | 3d 22 31 30 30 25 22 3e |0" WIDTH|="100%">| |000008f0| 0d 0a 3c 74 72 3e 0d 0a | 3c 74 64 3e 3c 2f 74 64 |..<tr>..|<td></td| |00000900| 3e 0d 0a 3c 74 64 3e 3c | 2f 74 64 3e 0d 0a 3c 74 |>..<td><|/td>..<t| |00000910| 64 3e 3c 2f 74 64 3e 0d | 0a 3c 74 64 3e 3c 2f 74 |d></td>.|.<td></t| |00000920| 64 3e 0d 0a 3c 2f 74 72 | 3e 0d 0a 3c 74 72 3e 0d |d>..</tr|>..<tr>.| |00000930| 0a 3c 74 64 20 63 6f 6c | 73 70 61 6e 3d 33 3e 3c |.<td col|span=3><| |00000940| 61 20 68 72 65 66 3d 22 | 73 70 65 63 69 66 69 63 |a href="|specific| |00000950| 61 74 69 6f 6e 73 2f 6f | 76 65 72 76 69 65 77 2d |ations/o|verview-| |00000960| 73 75 6d 6d 61 72 79 2e | 68 74 6d 6c 22 3e 52 65 |summary.|html">Re| |00000970| 66 65 72 65 6e 63 65 3c | 2f 61 3e 26 6e 62 73 70 |ference<|/a> | |00000980| 3b 7c 20 3c 61 20 68 72 | 65 66 3d 22 68 65 6c 70 |;| <a hr|ef="help| |00000990| 2f 68 65 6c 70 2e 68 74 | 6d 6c 22 3e 48 65 6c 70 |/help.ht|ml">Help| |000009a0| 3c 2f 61 3e 26 6e 62 73 | 70 3b 7c 20 3c 61 20 68 |</a>&nbs|p;| <a h| |000009b0| 72 65 66 3d 22 69 6e 74 | 72 6f 64 75 63 74 69 6f |ref="int|roductio| |000009c0| 6e 2f 69 6e 74 72 6f 64 | 75 63 74 69 6f 6e 2e 68 |n/introd|uction.h| |000009d0| 74 6d 6c 22 3e 49 6e 74 | 72 6f 64 75 63 74 69 6f |tml">Int|roductio| |000009e0| 6e 3c 2f 61 3e 26 6e 62 | 73 70 3b 7c 20 3c 61 20 |n</a>&nb|sp;| <a | |000009f0| 68 72 65 66 3d 22 73 6c | 69 64 65 5f 73 68 6f 77 |href="sl|ide_show| |00000a00| 2f 63 6f 76 65 72 50 61 | 67 65 2e 68 74 6d 6c 22 |/coverPa|ge.html"| |00000a10| 3e 53 6c 69 64 65 20 53 | 68 6f 77 3c 2f 61 3e 26 |>Slide S|how</a>&| |00000a20| 6e 62 73 70 3b 7c 20 3c | 62 3e 43 6c 61 73 73 20 |nbsp;| <|b>Class | |00000a30| 48 69 65 72 61 72 63 68 | 79 3c 2f 62 3e 3c 2f 74 |Hierarch|y</b></t| |00000a40| 64 3e 0d 0a 3c 74 64 20 | 61 6c 69 67 6e 3d 72 69 |d>..<td |align=ri| |00000a50| 67 68 74 20 76 61 6c 69 | 67 6e 3d 74 6f 70 20 72 |ght vali|gn=top r| |00000a60| 6f 77 73 70 61 6e 3d 32 | 3e 3c 65 6d 3e 0d 0a 49 |owspan=2|><em>..I| |00000a70| 6e 74 65 72 43 6c 69 65 | 6e 74 3c 2f 65 6d 3e 0d |nterClie|nt</em>.| |00000a80| 0a 3c 2f 74 64 3e 0d 0a | 3c 2f 74 72 3e 0d 0a 3c |.</td>..|</tr>..<| |00000a90| 74 72 3e 0d 0a 3c 74 64 | 3e 3c 66 6f 6e 74 20 73 |tr>..<td|><font s| |00000aa0| 69 7a 65 3d 22 2d 32 22 | 3e 0d 0a 50 52 45 56 26 |ize="-2"|>..PREV&| |00000ab0| 6e 62 73 70 3b 7c 20 4e | 45 58 54 3c 2f 66 6f 6e |nbsp;| N|EXT</fon| |00000ac0| 74 3e 0d 0a 3c 2f 74 64 | 3e 0d 0a 3c 74 64 3e 3c |t>..</td|>..<td><| |00000ad0| 66 6f 6e 74 20 73 69 7a | 65 3d 22 2d 32 22 3e 0d |font siz|e="-2">.| |00000ae0| 0a 3c 61 20 68 72 65 66 | 3d 22 69 6e 64 65 78 2e |.<a href|="index.| |00000af0| 68 74 6d 6c 22 20 74 61 | 72 67 65 74 3d 22 5f 74 |html" ta|rget="_t| |00000b00| 6f 70 22 3e 46 52 41 4d | 45 53 3c 2f 61 3e 0d 0a |op">FRAM|ES</a>..| |00000b10| 26 6e 62 73 70 3b 7c 20 | 3c 61 20 68 72 65 66 3d | | |<a href=| |00000b20| 22 63 75 73 74 6f 6d 48 | 69 65 72 61 72 63 68 79 |"customH|ierarchy| |00000b30| 2e 68 74 6d 6c 22 20 74 | 61 72 67 65 74 3d 22 5f |.html" t|arget="_| |00000b40| 74 6f 70 22 3e 4e 4f 20 | 46 52 41 4d 45 53 3c 2f |top">NO |FRAMES</| |00000b50| 61 3e 0d 0a 3c 2f 66 6f | 6e 74 3e 0d 0a 3c 2f 74 |a>..</fo|nt>..</t| |00000b60| 64 3e 0d 0a 3c 74 64 3e | 3c 2f 74 64 3e 0d 0a 3c |d>..<td>|</td>..<| |00000b70| 74 64 3e 3c 2f 74 64 3e | 0d 0a 3c 2f 74 72 3e 0d |td></td>|..</tr>.| |00000b80| 0a 3c 2f 74 61 62 6c 65 | 3e 0d 0a 3c 68 72 3e 0d |.</table|>..<hr>.| |00000b90| 0a 53 65 6e 64 20 63 6f | 6d 6d 65 6e 74 73 20 6f |.Send co|mments o| |00000ba0| 72 20 73 75 67 67 65 73 | 74 69 6f 6e 73 20 74 6f |r sugges|tions to| |00000bb0| 20 3c 61 20 68 72 65 66 | 3d 22 6d 61 69 6c 74 6f | <a href|="mailto| |00000bc0| 3a 69 63 73 75 70 70 6f | 72 74 40 69 6e 74 65 72 |:icsuppo|rt@inter| |00000bd0| 62 61 73 65 2e 63 6f 6d | 22 3e 69 63 73 75 70 70 |base.com|">icsupp| |00000be0| 6f 72 74 40 69 6e 74 65 | 72 62 61 73 65 2e 63 6f |ort@inte|rbase.co| |00000bf0| 6d 3c 2f 61 3e 3c 2f 62 | 6f 64 79 3e 0d 0a 0d 0a |m</a></b|ody>....| |00000c00| 3c 2f 62 6f 64 79 3e 0d | 0a 3c 2f 68 74 6d 6c 3e |</body>.|.</html>| |00000c10| 0d 0a 50 4b 03 04 0a 00 | 00 00 00 00 81 86 35 25 |..PK....|......5%| |00000c20| b9 f9 bb 60 fd 03 00 00 | fd 03 00 00 0e 00 00 00 |...`....|........| |00000c30| 64 6f 63 73 2f 64 6f 63 | 73 2e 68 74 6d 6c 3c 68 |docs/doc|s.html<h| |00000c40| 74 6d 6c 3e 0d 0a 3c 68 | 65 61 64 3e 0d 0a 3c 74 |tml>..<h|ead>..<t| |00000c50| 69 74 6c 65 3e 49 6e 74 | 65 72 43 6c 69 65 6e 74 |itle>Int|erClient| |00000c60| 20 44 6f 63 75 6d 65 6e | 74 61 74 69 6f 6e 3c 2f | Documen|tation</| |00000c70| 74 69 74 6c 65 3e 0d 0a | 3c 2f 68 65 61 64 3e 0d |title>..|</head>.| |00000c80| 0a 0d 0a 3c 62 6f 64 79 | 20 62 67 63 6f 6c 6f 72 |...<body| bgcolor| |00000c90| 3d 22 23 46 46 46 46 46 | 46 22 3e 0d 0a 3c 61 20 |="#FFFFF|F">..<a | |00000ca0| 6e 61 6d 65 3d 22 64 6f | 63 73 65 74 22 3e 3c 2f |name="do|cset"></| |00000cb0| 61 3e 0d 0a 3c 68 31 3e | 49 6e 74 65 72 43 6c 69 |a>..<h1>|InterCli| |00000cc0| 65 6e 74 20 44 6f 63 75 | 6d 65 6e 74 61 74 69 6f |ent Docu|mentatio| |00000cd0| 6e 20 53 65 74 3c 2f 68 | 31 3e 0d 0a 3c 70 3e 0d |n Set</h|1>..<p>.| |00000ce0| 0a 3c 68 72 3e 0d 0a 3c | 74 61 62 6c 65 20 42 4f |.<hr>..<|table BO| |00000cf0| 52 44 45 52 3d 22 30 22 | 20 57 49 44 54 48 3d 22 |RDER="0"| WIDTH="| |00000d00| 31 30 30 25 22 3e 0d 0a | 3c 74 72 3e 0d 0a 3c 74 |100%">..|<tr>..<t| |00000d10| 64 3e 3c 2f 74 64 3e 0d | 0a 3c 74 64 3e 3c 2f 74 |d></td>.|.<td></t| |00000d20| 64 3e 0d 0a 3c 74 64 3e | 3c 2f 74 64 3e 0d 0a 3c |d>..<td>|</td>..<| |00000d30| 74 64 3e 3c 2f 74 64 3e | 0d 0a 3c 2f 74 72 3e 0d |td></td>|..</tr>.| |00000d40| 0a 3c 74 72 3e 0d 0a 3c | 74 64 20 63 6f 6c 73 70 |.<tr>..<|td colsp| |00000d50| 61 6e 3d 33 3e 3c 61 20 | 68 72 65 66 3d 22 73 70 |an=3><a |href="sp| |00000d60| 65 63 69 66 69 63 61 74 | 69 6f 6e 73 2f 6f 76 65 |ecificat|ions/ove| |00000d70| 72 76 69 65 77 2d 73 75 | 6d 6d 61 72 79 2e 68 74 |rview-su|mmary.ht| |00000d80| 6d 6c 22 3e 52 65 66 65 | 72 65 6e 63 65 3c 2f 61 |ml">Refe|rence</a| |00000d90| 3e 26 6e 62 73 70 3b 7c | 20 3c 61 20 68 72 65 66 |> || <a href| |00000da0| 3d 22 68 65 6c 70 2f 68 | 65 6c 70 2e 68 74 6d 6c |="help/h|elp.html| |00000db0| 22 3e 48 65 6c 70 3c 2f | 61 3e 26 6e 62 73 70 3b |">Help</|a> | |00000dc0| 7c 20 3c 61 20 68 72 65 | 66 3d 22 69 6e 74 72 6f || <a hre|f="intro| |00000dd0| 64 75 63 74 69 6f 6e 2f | 69 6e 74 72 6f 64 75 63 |duction/|introduc| |00000de0| 74 69 6f 6e 2e 68 74 6d | 6c 22 3e 49 6e 74 72 6f |tion.htm|l">Intro| |00000df0| 64 75 63 74 69 6f 6e 3c | 2f 61 3e 26 6e 62 73 70 |duction<|/a> | |00000e00| 3b 7c 20 3c 61 20 68 72 | 65 66 3d 22 73 6c 69 64 |;| <a hr|ef="slid| |00000e10| 65 5f 73 68 6f 77 2f 63 | 6f 76 65 72 50 61 67 65 |e_show/c|overPage| |00000e20| 2e 68 74 6d 6c 22 3e 53 | 6c 69 64 65 20 53 68 6f |.html">S|lide Sho| |00000e30| 77 3c 2f 61 3e 26 6e 62 | 73 70 3b 7c 20 3c 61 20 |w</a>&nb|sp;| <a | |00000e40| 68 72 65 66 3d 22 63 75 | 73 74 6f 6d 48 69 65 72 |href="cu|stomHier| |00000e50| 61 72 63 68 79 2e 68 74 | 6d 6c 22 3e 43 6c 61 73 |archy.ht|ml">Clas| |00000e60| 73 20 48 69 65 72 61 72 | 63 68 79 3c 2f 61 3e 3c |s Hierar|chy</a><| |00000e70| 2f 74 64 3e 0d 0a 3c 74 | 64 20 61 6c 69 67 6e 3d |/td>..<t|d align=| |00000e80| 72 69 67 68 74 20 76 61 | 6c 69 67 6e 3d 74 6f 70 |right va|lign=top| |00000e90| 20 72 6f 77 73 70 61 6e | 3d 32 3e 3c 65 6d 3e 0d | rowspan|=2><em>.| |00000ea0| 0a 49 6e 74 65 72 43 6c | 69 65 6e 74 3c 2f 65 6d |.InterCl|ient</em| |00000eb0| 3e 0d 0a 3c 2f 74 64 3e | 0d 0a 3c 2f 74 72 3e 0d |>..</td>|..</tr>.| |00000ec0| 0a 3c 74 72 3e 0d 0a 3c | 74 64 3e 3c 66 6f 6e 74 |.<tr>..<|td><font| |00000ed0| 20 73 69 7a 65 3d 22 2d | 32 22 3e 0d 0a 50 52 45 | size="-|2">..PRE| |00000ee0| 56 26 6e 62 73 70 3b 7c | 20 4e 45 58 54 3c 2f 66 |V || NEXT</f| |00000ef0| 6f 6e 74 3e 0d 0a 3c 2f | 74 64 3e 0d 0a 3c 74 64 |ont>..</|td>..<td| |00000f00| 3e 3c 66 6f 6e 74 20 73 | 69 7a 65 3d 22 2d 32 22 |><font s|ize="-2"| |00000f10| 3e 0d 0a 3c 61 20 68 72 | 65 66 3d 22 69 6e 64 65 |>..<a hr|ef="inde| |00000f20| 78 2e 68 74 6d 6c 22 20 | 74 61 72 67 65 74 3d 22 |x.html" |target="| |00000f30| 5f 74 6f 70 22 3e 46 52 | 41 4d 45 53 3c 2f 61 3e |_top">FR|AMES</a>| |00000f40| 0d 0a 26 6e 62 73 70 3b | 7c 20 3c 61 20 68 72 65 |.. || <a hre| |00000f50| 66 3d 22 64 6f 63 73 2e | 68 74 6d 6c 22 20 74 61 |f="docs.|html" ta| |00000f60| 72 67 65 74 3d 22 5f 74 | 6f 70 22 3e 4e 4f 20 46 |rget="_t|op">NO F| |00000f70| 52 41 4d 45 53 3c 2f 61 | 3e 0d 0a 3c 2f 66 6f 6e |RAMES</a|>..</fon| |00000f80| 74 3e 0d 0a 3c 2f 74 64 | 3e 0d 0a 3c 74 64 3e 3c |t>..</td|>..<td><| |00000f90| 2f 74 64 3e 0d 0a 3c 74 | 64 3e 3c 2f 74 64 3e 0d |/td>..<t|d></td>.| |00000fa0| 0a 3c 2f 74 72 3e 0d 0a | 3c 2f 74 61 62 6c 65 3e |.</tr>..|</table>| |00000fb0| 0d 0a 3c 68 72 3e 0d 0a | 0d 0a 53 65 6e 64 20 63 |..<hr>..|..Send c| |00000fc0| 6f 6d 6d 65 6e 74 73 20 | 6f 72 20 73 75 67 67 65 |omments |or sugge| |00000fd0| 73 74 69 6f 6e 73 20 74 | 6f 20 3c 61 20 68 72 65 |stions t|o <a hre| |00000fe0| 66 3d 22 6d 61 69 6c 74 | 6f 3a 69 63 73 75 70 70 |f="mailt|o:icsupp| |00000ff0| 6f 72 74 40 69 6e 74 65 | 72 62 61 73 65 2e 63 6f |ort@inte|rbase.co| |00001000| 6d 22 3e 69 63 73 75 70 | 70 6f 72 74 40 69 6e 74 |m">icsup|port@int| |00001010| 65 72 62 61 73 65 2e 63 | 6f 6d 3c 2f 61 3e 3c 2f |erbase.c|om</a></| |00001020| 62 6f 64 79 3e 0d 0a 3c | 2f 62 6f 64 79 3e 0d 0a |body>..<|/body>..| |00001030| 3c 2f 68 74 6d 6c 3e 0d | 0a 0d 0a 50 4b 03 04 0a |</html>.|...PK...| |00001040| 00 00 00 00 00 12 86 35 | 25 d4 54 37 1f 0e 16 00 |.......5|%.T7....| |00001050| 00 0e 16 00 00 1e 00 00 | 00 64 6f 63 73 2f 65 78 |........|.docs/ex| |00001060| 61 6d 70 6c 65 73 2f 45 | 78 61 6d 70 6c 65 54 65 |amples/E|xampleTe| |00001070| 73 74 73 2e 74 78 74 3c | 70 72 65 3e 0d 0a 2f 2f |sts.txt<|pre>..//| |00001080| 20 43 6f 70 79 72 69 67 | 68 74 20 49 6e 74 65 72 | Copyrig|ht Inter| |00001090| 42 61 73 65 20 53 6f 66 | 74 77 61 72 65 20 43 6f |Base Sof|tware Co| |000010a0| 72 70 6f 72 61 74 69 6f | 6e 2c 20 31 39 39 38 2e |rporatio|n, 1998.| |000010b0| 0d 0a 2f 2f 20 57 72 69 | 74 74 65 6e 20 62 79 20 |..// Wri|tten by | |000010c0| 69 6e 70 72 69 73 65 2e | 69 6e 74 65 72 62 61 73 |inprise.|interbas| |000010d0| 65 2e 69 6e 74 65 72 63 | 6c 69 65 6e 74 2e 72 26 |e.interc|lient.r&| |000010e0| 64 2e 50 61 75 6c 4f 73 | 74 6c 65 72 20 3a 2d 29 |d.PaulOs|tler :-)| |000010f0| 0d 0a 0d 0a 2f 2a 2a 0d | 0a 20 2a 20 45 78 61 6d |..../**.|. * Exam| |00001100| 70 6c 65 20 70 72 6f 67 | 72 61 6d 20 75 73 69 6e |ple prog|ram usin| |00001110| 67 20 69 6e 74 65 72 62 | 61 73 65 2e 69 6e 74 65 |g interb|ase.inte| |00001120| 72 63 6c 69 65 6e 74 2e | 50 65 72 66 6f 72 6d 61 |rclient.|Performa| |00001130| 6e 63 65 54 65 73 74 73 | 20 63 6c 61 73 73 2e 0d |nceTests| class..| |00001140| 0a 20 2a 20 43 6f 70 79 | 20 61 6e 64 20 65 64 69 |. * Copy| and edi| |00001150| 74 20 74 68 69 73 20 70 | 72 6f 67 72 61 6d 20 61 |t this p|rogram a| |00001160| 73 20 64 65 73 69 72 65 | 64 2e 0d 0a 20 2a 20 53 |s desire|d... * S| |00001170| 65 65 20 69 6e 74 65 72 | 62 61 73 65 2e 69 6e 74 |ee inter|base.int| |00001180| 65 72 63 6c 69 65 6e 74 | 2e 75 74 69 6c 73 2e 50 |erclient|.utils.P| |00001190| 65 72 66 6f 72 6d 61 6e | 63 65 54 65 73 74 73 0d |erforman|ceTests.| |000011a0| 0a 20 2a 20 66 6f 72 20 | 61 20 64 65 73 63 72 69 |. * for |a descri| |000011b0| 70 74 69 6f 6e 20 6f 66 | 20 63 6f 6e 66 69 67 75 |ption of| configu| |000011c0| 72 61 74 69 6f 6e 20 76 | 61 72 69 61 62 6c 65 73 |ration v|ariables| |000011d0| 2e 0d 0a 20 2a 20 40 73 | 65 65 20 50 65 72 66 6f |... * @s|ee Perfo| |000011e0| 72 6d 61 6e 63 65 54 65 | 73 74 73 0d 0a 20 2a 20 |rmanceTe|sts.. * | |000011f0| 40 61 75 74 68 6f 72 20 | 50 61 75 6c 20 4f 73 74 |@author |Paul Ost| |00001200| 6c 65 72 0d 0a 20 2a 2a | 2f 0d 0a 70 75 62 6c 69 |ler.. **|/..publi| |00001210| 63 20 63 6c 61 73 73 20 | 45 78 61 6d 70 6c 65 54 |c class |ExampleT| |00001220| 65 73 74 73 0d 0a 7b 0d | 0a 20 20 2f 2f 20 42 44 |ests..{.|. // BD| |00001230| 45 20 61 6c 69 61 73 65 | 73 3a 20 6c 6f 63 61 6c |E aliase|s: local| |00001240| 54 65 73 74 20 73 65 74 | 20 74 6f 20 64 3a 5c 64 |Test set| to d:\d| |00001250| 61 74 61 62 61 73 65 73 | 5c 74 65 73 74 2e 67 64 |atabases|\test.gd| |00001260| 62 0d 0a 20 20 2f 2f 20 | 20 20 20 20 20 20 20 20 |b.. // | | |00001270| 20 20 20 20 20 63 6c 69 | 65 6e 74 53 65 72 76 65 | cli|entServe| |00001280| 72 54 65 73 74 20 73 65 | 74 20 74 6f 20 68 6f 73 |rTest se|t to hos| |00001290| 74 6e 61 6d 65 3a 64 3a | 5c 64 61 74 61 62 61 73 |tname:d:|\databas| |000012a0| 65 73 5c 74 65 73 74 2e | 67 64 62 0d 0a 20 20 2f |es\test.|gdb.. /| |000012b0| 2f 20 4f 44 42 43 20 61 | 6c 69 61 73 65 73 3a 20 |/ ODBC a|liases: | |000012c0| 6c 6f 63 61 6c 54 65 73 | 74 20 73 65 74 20 74 6f |localTes|t set to| |000012d0| 20 64 3a 5c 64 61 74 61 | 62 61 73 65 73 5c 74 65 | d:\data|bases\te| |000012e0| 73 74 2e 67 64 62 0d 0a | 20 20 2f 2f 20 20 20 20 |st.gdb..| // | |000012f0| 20 20 20 20 20 20 20 20 | 20 20 63 6c 69 65 6e 74 | | client| |00001300| 53 65 72 76 65 72 54 65 | 73 74 20 73 65 74 20 74 |ServerTe|st set t| |00001310| 6f 20 68 6f 73 74 6e 61 | 6d 65 3a 64 3a 5c 64 61 |o hostna|me:d:\da| |00001320| 74 61 62 61 73 65 73 5c | 74 65 73 74 2e 67 64 62 |tabases\|test.gdb| |00001330| 0d 0a 0d 0a 20 20 2f 2f | 20 59 6f 75 20 63 61 6e |.... //| You can| |00001340| 20 73 65 74 20 68 6f 73 | 74 6e 61 6d 65 20 74 6f | set hos|tname to| |00001350| 20 6c 6f 63 61 6c 68 6f | 73 74 20 74 6f 20 74 65 | localho|st to te| |00001360| 73 74 20 63 6c 69 65 6e | 74 2f 73 65 72 76 65 72 |st clien|t/server| |00001370| 20 69 6e 20 6c 6f 6f 70 | 62 61 63 6b 20 6d 6f 64 | in loop|back mod| |00001380| 65 2e 0d 0a 0d 0a 20 20 | 2f 2a 2a 0d 0a 20 20 20 |e..... |/**.. | |00001390| 2a 20 43 6f 6e 66 69 67 | 75 72 65 20 50 65 72 66 |* Config|ure Perf| |000013a0| 6f 72 6d 61 6e 63 65 54 | 65 73 74 73 20 70 75 62 |ormanceT|ests pub| |000013b0| 6c 69 63 20 76 61 72 69 | 61 62 6c 65 73 20 61 6e |lic vari|ables an| |000013c0| 64 20 72 75 6e 20 73 6f | 6d 65 20 74 65 73 74 73 |d run so|me tests| |000013d0| 2e 0d 0a 20 20 20 2a 20 | 40 74 68 72 6f 77 73 20 |... * |@throws | |000013e0| 6a 61 76 61 2e 73 71 6c | 2e 53 51 4c 45 78 63 65 |java.sql|.SQLExce| |000013f0| 70 74 69 6f 6e 20 69 66 | 20 61 20 64 61 74 61 62 |ption if| a datab| |00001400| 61 73 65 20 61 63 63 65 | 73 73 20 65 72 72 6f 72 |ase acce|ss error| |00001410| 20 6f 63 63 75 72 73 0d | 0a 20 20 20 2a 2a 2f 0d | occurs.|. **/.| |00001420| 0a 20 20 73 74 61 74 69 | 63 20 70 75 62 6c 69 63 |. stati|c public| |00001430| 20 76 6f 69 64 20 6d 61 | 69 6e 20 28 53 74 72 69 | void ma|in (Stri| |00001440| 6e 67 5b 5d 20 61 72 67 | 73 29 20 74 68 72 6f 77 |ng[] arg|s) throw| |00001450| 73 20 6a 61 76 61 2e 73 | 71 6c 2e 53 51 4c 45 78 |s java.s|ql.SQLEx| |00001460| 63 65 70 74 69 6f 6e 0d | 0a 20 20 7b 0d 0a 20 20 |ception.|. {.. | |00001470| 20 20 2f 2f 20 54 68 69 | 73 20 64 65 74 65 72 6d | // Thi|s determ| |00001480| 69 6e 65 73 20 77 68 61 | 74 20 64 72 69 76 65 72 |ines wha|t driver| |00001490| 73 20 61 63 74 75 61 6c | 6c 79 20 67 65 74 20 74 |s actual|ly get t| |000014a0| 65 73 74 65 64 2e 0d 0a | 20 20 20 20 2f 2f 20 41 |ested...| // A| |000014b0| 6c 77 61 79 73 20 70 6f | 69 6e 74 20 74 6f 20 74 |lways po|int to t| |000014c0| 68 65 20 73 61 6d 65 20 | 64 62 46 69 6c 65 20 77 |he same |dbFile w| |000014d0| 68 65 6e 20 74 65 73 74 | 69 6e 67 20 49 6e 74 65 |hen test|ing Inte| |000014e0| 72 42 61 73 65 20 55 52 | 4c 73 0d 0a 20 20 20 20 |rBase UR|Ls.. | |000014f0| 50 65 72 66 6f 72 6d 61 | 6e 63 65 54 65 73 74 73 |Performa|nceTests| |00001500| 2e 64 72 69 76 65 72 73 | 54 6f 54 65 73 74 20 3d |.drivers|ToTest =| |00001510| 20 6e 65 77 20 53 74 72 | 69 6e 67 5b 5d 5b 5d 20 | new Str|ing[][] | |00001520| 7b 0d 0a 20 20 20 20 20 | 20 2f 2f 20 2a 2a 2a 20 |{.. | // *** | |00001530| 43 6c 69 65 6e 74 2f 73 | 65 72 76 65 72 20 55 52 |Client/s|erver UR| |00001540| 4c 73 20 2a 2a 2a 0d 0a | 20 20 20 20 20 20 2f 2f |Ls ***..| //| |00001550| 20 4a 44 42 43 2d 4f 44 | 42 43 20 62 72 69 64 67 | JDBC-OD|BC bridg| |00001560| 65 20 75 73 65 73 20 69 | 6e 74 65 72 62 61 73 65 |e uses i|nterbase| |00001570| 20 70 72 6f 74 6f 63 6f | 6c 20 74 68 72 75 20 4f | protoco|l thru O| |00001580| 44 42 43 0d 0a 20 20 20 | 20 20 20 20 7b 20 22 69 |DBC.. | { "i| |00001590| 6e 74 65 72 62 61 73 65 | 22 2c 0d 0a 20 20 20 20 |nterbase|",.. | |000015a0| 20 20 20 20 20 22 73 79 | 73 64 62 61 22 2c 0d 0a | "sy|sdba",..| |000015b0| 20 20 20 20 20 20 20 20 | 20 22 6d 61 73 74 65 72 | | "master| |000015c0| 6b 65 79 22 2c 0d 0a 20 | 20 20 20 20 20 20 20 20 |key",.. | | |000015d0| 22 6a 64 62 63 3a 6f 64 | 62 63 3a 63 6c 69 65 6e |"jdbc:od|bc:clien| |000015e0| 74 53 65 72 76 65 72 54 | 65 73 74 22 2c 0d 0a 20 |tServerT|est",.. | |000015f0| 20 20 20 20 20 20 20 20 | 22 73 75 6e 2e 6a 64 62 | |"sun.jdb| |00001600| 63 2e 6f 64 62 63 2e 4a | 64 62 63 4f 64 62 63 44 |c.odbc.J|dbcOdbcD| |00001610| 72 69 76 65 72 22 20 7d | 0d 0a 20 20 20 20 20 20 |river" }|.. | |00001620| 2f 2f 20 49 6e 74 65 72 | 43 6c 69 65 6e 74 20 75 |// Inter|Client u| |00001630| 73 65 73 20 61 20 4a 44 | 42 43 20 70 72 6f 74 6f |ses a JD|BC proto| |00001640| 63 6f 6c 20 74 6f 20 49 | 53 43 20 67 61 74 65 77 |col to I|SC gatew| |00001650| 61 79 0d 0a 20 20 20 20 | 20 20 2c 7b 20 22 69 6e |ay.. | ,{ "in| |00001660| 74 65 72 62 61 73 65 22 | 2c 0d 0a 20 20 20 20 20 |terbase"|,.. | |00001670| 20 20 20 20 22 73 79 73 | 64 62 61 22 2c 0d 0a 20 | "sys|dba",.. | |00001680| 20 20 20 20 20 20 20 20 | 22 6d 61 73 74 65 72 6b | |"masterk| |00001690| 65 79 22 2c 0d 0a 20 20 | 20 20 20 20 20 20 20 22 |ey",.. | "| |000016a0| 6a 64 62 63 3a 69 6e 74 | 65 72 62 61 73 65 3a 2f |jdbc:int|erbase:/| |000016b0| 2f 68 6f 73 74 6e 61 6d | 65 2f 64 3a 2f 64 61 74 |/hostnam|e/d:/dat| |000016c0| 61 62 61 73 65 73 2f 74 | 65 73 74 2e 67 64 62 22 |abases/t|est.gdb"| |000016d0| 2c 0d 0a 20 20 20 20 20 | 20 20 20 20 22 69 6e 74 |,.. | "int| |000016e0| 65 72 62 61 73 65 2e 69 | 6e 74 65 72 63 6c 69 65 |erbase.i|nterclie| |000016f0| 6e 74 2e 44 72 69 76 65 | 72 22 20 7d 0d 0a 20 20 |nt.Drive|r" }.. | |00001700| 20 20 20 20 2f 2f 20 53 | 79 62 61 73 65 20 6a 43 | // S|ybase jC| |00001710| 6f 6e 6e 65 63 74 20 75 | 73 65 73 20 54 44 53 20 |onnect u|ses TDS | |00001720| 70 72 6f 74 6f 63 6f 6c | 20 74 6f 20 4f 70 65 6e |protocol| to Open| |00001730| 20 53 65 72 76 65 72 0d | 0a 20 20 20 20 20 20 2c | Server.|. ,| |00001740| 20 7b 20 22 73 71 6c 61 | 6e 79 77 68 65 72 65 22 | { "sqla|nywhere"| |00001750| 2c 0d 0a 20 20 20 20 20 | 20 20 20 20 20 22 64 62 |,.. | "db| |00001760| 61 22 2c 0d 0a 20 20 20 | 20 20 20 20 20 20 20 22 |a",.. | "| |00001770| 73 71 6c 22 2c 0d 0a 20 | 20 20 20 20 20 20 20 20 |sql",.. | | |00001780| 20 22 6a 64 62 63 3a 73 | 79 62 61 73 65 3a 54 64 | "jdbc:s|ybase:Td| |00001790| 73 3a 68 6f 73 74 6e 61 | 6d 65 3a 34 34 34 34 2f |s:hostna|me:4444/| |000017a0| 64 3a 5c 5c 73 71 6c 61 | 6e 79 35 30 5c 5c 73 61 |d:\\sqla|ny50\\sa| |000017b0| 64 65 6d 6f 2e 64 62 22 | 2c 0d 0a 20 20 20 20 20 |demo.db"|,.. | |000017c0| 20 20 20 20 20 22 63 6f | 6d 2e 73 79 62 61 73 65 | "co|m.sybase| |000017d0| 2e 6a 64 62 63 2e 53 79 | 62 44 72 69 76 65 72 22 |.jdbc.Sy|bDriver"| |000017e0| 20 7d 0d 0a 20 20 20 20 | 20 20 2f 2f 20 53 79 6d | }.. | // Sym| |000017f0| 61 6e 74 65 63 20 64 62 | 41 6e 79 77 68 65 72 65 |antec db|Anywhere| |00001800| 20 75 73 65 73 20 61 20 | 4a 44 42 43 20 70 72 6f | uses a |JDBC pro| |00001810| 74 6f 63 6f 6c 20 74 6f | 20 4f 44 42 43 20 67 61 |tocol to| ODBC ga| |00001820| 74 65 77 61 79 0d 0a 20 | 20 20 20 20 20 2c 7b 20 |teway.. | ,{ | |00001830| 22 73 71 6c 61 6e 79 77 | 68 65 72 65 22 2c 0d 0a |"sqlanyw|here",..| |00001840| 20 20 20 20 20 20 20 20 | 20 22 64 62 61 22 2c 0d | | "dba",.| |00001850| 0a 20 20 20 20 20 20 20 | 20 20 22 73 71 6c 22 2c |. | "sql",| |00001860| 0d 0a 20 20 20 20 20 20 | 20 20 20 22 6a 64 62 63 |.. | "jdbc| |00001870| 3a 64 62 61 77 3a 2f 2f | 68 6f 73 74 6e 61 6d 65 |:dbaw://|hostname| |00001880| 3a 38 38 38 39 2f 53 79 | 62 61 73 65 5f 53 51 4c |:8889/Sy|base_SQL| |00001890| 41 4e 59 2f 53 61 64 65 | 6d 6f 2f 53 61 64 65 6d |ANY/Sade|mo/Sadem| |000018a0| 6f 22 2c 0d 0a 20 20 20 | 20 20 20 20 20 20 22 73 |o",.. | "s| |000018b0| 79 6d 61 6e 74 65 63 2e | 69 74 6f 6f 6c 73 2e 64 |ymantec.|itools.d| |000018c0| 62 2e 6a 64 62 63 2e 44 | 72 69 76 65 72 22 20 7d |b.jdbc.D|river" }| |000018d0| 0d 0a 20 20 20 20 20 20 | 2f 2f 20 44 61 74 61 67 |.. |// Datag| |000018e0| 61 74 65 77 61 79 20 42 | 72 6f 6b 65 72 20 75 73 |ateway B|roker us| |000018f0| 65 73 20 61 20 4a 44 42 | 43 20 70 72 6f 74 6f 63 |es a JDB|C protoc| |00001900| 6f 6c 20 74 6f 20 42 44 | 45 20 67 61 74 65 77 61 |ol to BD|E gatewa| |00001910| 79 0d 0a 20 20 20 20 20 | 20 2c 7b 20 22 69 6e 74 |y.. | ,{ "int| |00001920| 65 72 62 61 73 65 22 2c | 0d 0a 20 20 20 20 20 20 |erbase",|.. | |00001930| 20 20 20 22 73 79 73 64 | 62 61 22 2c 0d 0a 20 20 | "sysd|ba",.. | |00001940| 20 20 20 20 20 20 20 22 | 6d 61 73 74 65 72 6b 65 | "|masterke| |00001950| 79 22 2c 0d 0a 20 20 20 | 20 20 20 20 20 20 22 6a |y",.. | "j| |00001960| 64 62 63 3a 42 6f 72 6c | 61 6e 64 42 72 6f 6b 65 |dbc:Borl|andBroke| |00001970| 72 3a 2f 2f 68 6f 73 74 | 6e 61 6d 65 2f 6c 6f 63 |r://host|name/loc| |00001980| 61 6c 54 65 73 74 22 2c | 0d 0a 20 20 20 20 20 20 |alTest",|.. | |00001990| 20 20 20 22 62 6f 72 6c | 61 6e 64 2e 6a 64 62 63 | "borl|and.jdbc| |000019a0| 2e 42 72 6f 6b 65 72 2e | 52 65 6d 6f 74 65 44 72 |.Broker.|RemoteDr| |000019b0| 69 76 65 72 22 20 7d 0d | 0a 20 20 20 20 20 20 2f |iver" }.|. /| |000019c0| 2f 20 44 61 74 61 67 61 | 74 65 77 61 79 20 42 72 |/ Dataga|teway Br| |000019d0| 69 64 67 65 20 75 73 65 | 73 20 69 6e 74 65 72 62 |idge use|s interb| |000019e0| 61 73 65 20 70 72 6f 74 | 6f 63 6f 6c 20 74 68 72 |ase prot|ocol thr| |000019f0| 75 20 42 44 45 0d 0a 20 | 20 20 20 20 20 2c 7b 20 |u BDE.. | ,{ | |00001a00| 22 69 6e 74 65 72 62 61 | 73 65 22 2c 0d 0a 20 20 |"interba|se",.. | |00001a10| 20 20 20 20 20 20 20 22 | 73 79 73 64 62 61 22 2c | "|sysdba",| |00001a20| 0d 0a 20 20 20 20 20 20 | 20 20 20 22 6d 61 73 74 |.. | "mast| |00001a30| 65 72 6b 65 79 22 2c 0d | 0a 20 20 20 20 20 20 20 |erkey",.|. | |00001a40| 20 20 22 6a 64 62 63 3a | 42 6f 72 6c 61 6e 64 42 | "jdbc:|BorlandB| |00001a50| 72 69 64 67 65 3a 63 6c | 69 65 6e 74 53 65 72 76 |ridge:cl|ientServ| |00001a60| 65 72 54 65 73 74 22 2c | 0d 0a 20 20 20 20 20 20 |erTest",|.. | |00001a70| 20 20 20 22 62 6f 72 6c | 61 6e 64 2e 6a 64 62 63 | "borl|and.jdbc| |00001a80| 2e 42 72 69 64 67 65 2e | 4c 6f 63 61 6c 44 72 69 |.Bridge.|LocalDri| |00001a90| 76 65 72 22 20 7d 0d 0a | 20 20 20 20 20 20 2f 2f |ver" }..| //| |00001aa0| 20 4f 72 61 63 6c 65 20 | 54 68 69 6e 20 44 72 69 | Oracle |Thin Dri| |00001ab0| 76 65 72 20 75 73 65 73 | 20 4f 72 61 63 6c 65 20 |ver uses| Oracle | |00001ac0| 70 72 6f 74 6f 63 6f 6c | 0d 0a 20 20 20 20 20 20 |protocol|.. | |00001ad0| 2f 2f 2c 20 7b 20 22 6f | 72 61 63 6c 65 22 2c 0d |//, { "o|racle",.| |00001ae0| 0a 20 20 20 20 20 20 2f | 2f 20 20 20 20 22 75 73 |. /|/ "us| |00001af0| 65 72 22 2c 0d 0a 20 20 | 20 20 20 20 2f 2f 20 20 |er",.. | // | |00001b00| 20 20 22 70 61 73 73 77 | 6f 72 64 22 2c 0d 0a 20 | "passw|ord",.. | |00001b10| 20 20 20 20 20 2f 2f 20 | 20 20 20 22 6a 64 62 63 | // | "jdbc| |00001b20| 3a 6f 72 61 63 6c 65 3a | 74 68 69 6e 3a 40 68 6f |:oracle:|thin:@ho| |00001b30| 73 74 6e 61 6d 65 3a 31 | 35 32 31 3a 4f 52 43 4c |stname:1|521:ORCL| |00001b40| 22 2c 0d 0a 20 20 20 20 | 20 20 2f 2f 20 20 20 20 |",.. | // | |00001b50| 22 6f 72 61 63 6c 65 2e | 6a 64 62 63 2e 64 72 69 |"oracle.|jdbc.dri| |00001b60| 76 65 72 2e 4f 72 61 63 | 6c 65 44 72 69 76 65 72 |ver.Orac|leDriver| |00001b70| 22 20 7d 0d 0a 20 20 20 | 20 20 20 2f 2f 20 53 6f |" }.. | // So| |00001b80| 6c 69 64 20 44 72 69 76 | 65 72 20 75 73 65 73 20 |lid Driv|er uses | |00001b90| 53 6f 6c 69 64 20 70 72 | 6f 74 6f 63 6f 6c 0d 0a |Solid pr|otocol..| |00001ba0| 20 20 20 20 20 20 2f 2f | 2c 7b 20 22 73 6f 6c 69 | //|,{ "soli| |00001bb0| 64 22 2c 0d 0a 20 20 20 | 20 20 20 2f 2f 20 20 20 |d",.. | // | |00001bc0| 22 73 79 73 64 62 61 22 | 2c 0d 0a 20 20 20 20 20 |"sysdba"|,.. | |00001bd0| 20 2f 2f 20 20 20 22 6d | 61 73 74 65 72 6b 65 79 | // "m|asterkey| |00001be0| 22 2c 0d 0a 20 20 20 20 | 20 20 2f 2f 20 20 20 22 |",.. | // "| |00001bf0| 6a 64 62 63 3a 73 6f 6c | 69 64 3a 2f 2f 68 6f 73 |jdbc:sol|id://hos| |00001c00| 74 6e 61 6d 65 3a 31 33 | 31 33 2f 73 79 73 64 62 |tname:13|13/sysdb| |00001c10| 61 2f 6d 61 73 74 65 72 | 6b 65 79 22 2c 0d 0a 20 |a/master|key",.. | |00001c20| 20 20 20 20 20 2f 2f 20 | 20 20 22 73 6f 6c 69 64 | // | "solid| |00001c30| 2e 6a 64 62 63 2e 53 6f | 6c 69 64 44 72 69 76 65 |.jdbc.So|lidDrive| |00001c40| 72 22 20 7d 0d 0a 20 20 | 20 20 20 20 2f 2f 0d 0a |r" }.. | //..| |00001c50| 20 20 20 20 20 20 2f 2f | 20 2a 2a 2a 20 4c 6f 63 | //| *** Loc| |00001c60| 61 6c 20 55 52 4c 73 20 | 66 6f 6c 6c 6f 77 20 28 |al URLs |follow (| |00001c70| 6e 6f 74 20 63 6c 69 65 | 6e 74 2f 73 65 72 76 65 |not clie|nt/serve| |00001c80| 72 29 20 2a 2a 2a 0d 0a | 20 20 20 20 20 20 2f 2f |r) ***..| //| |00001c90| 20 44 61 74 61 67 61 74 | 65 77 61 79 20 42 72 69 | Datagat|eway Bri| |00001ca0| 64 67 65 20 75 73 65 64 | 20 6c 6f 63 61 6c 6c 79 |dge used| locally| |00001cb0| 20 74 68 72 75 20 42 44 | 45 0d 0a 20 20 20 20 20 | thru BD|E.. | |00001cc0| 20 2f 2f 2c 20 7b 20 22 | 69 6e 74 65 72 62 61 73 | //, { "|interbas| |00001cd0| 65 22 2c 0d 0a 20 20 20 | 20 20 20 2f 2f 20 20 20 |e",.. | // | |00001ce0| 20 22 73 79 73 64 62 61 | 22 2c 0d 0a 20 20 20 20 | "sysdba|",.. | |00001cf0| 20 20 2f 2f 20 20 20 20 | 22 6d 61 73 74 65 72 6b | // |"masterk| |00001d00| 65 79 22 2c 0d 0a 20 20 | 20 20 20 20 2f 2f 20 20 |ey",.. | // | |00001d10| 20 20 22 6a 64 62 63 3a | 42 6f 72 6c 61 6e 64 42 | "jdbc:|BorlandB| |00001d20| 72 69 64 67 65 3a 6c 6f | 63 61 6c 54 65 73 74 22 |ridge:lo|calTest"| |00001d30| 2c 0d 0a 20 20 20 20 20 | 20 2f 2f 20 20 20 20 22 |,.. | // "| |00001d40| 62 6f 72 6c 61 6e 64 2e | 6a 64 62 63 2e 42 72 69 |borland.|jdbc.Bri| |00001d50| 64 67 65 2e 4c 6f 63 61 | 6c 44 72 69 76 65 72 22 |dge.Loca|lDriver"| |00001d60| 20 7d 0d 0a 20 20 20 20 | 20 20 2f 2f 20 4a 44 42 | }.. | // JDB| |00001d70| 43 2d 4f 44 42 43 20 42 | 72 69 64 67 65 20 75 73 |C-ODBC B|ridge us| |00001d80| 65 64 20 6c 6f 63 61 6c | 6c 79 20 74 68 72 75 20 |ed local|ly thru | |00001d90| 4f 44 42 43 0d 0a 20 20 | 20 20 20 20 2f 2f 2c 20 |ODBC.. | //, | |00001da0| 7b 20 22 69 6e 74 65 72 | 62 61 73 65 22 2c 0d 0a |{ "inter|base",..| |00001db0| 20 20 20 20 20 20 2f 2f | 20 20 20 20 22 73 79 73 | //| "sys| |00001dc0| 64 62 61 22 2c 0d 0a 20 | 20 20 20 20 20 2f 2f 20 |dba",.. | // | |00001dd0| 20 20 20 22 6d 61 73 74 | 65 72 6b 65 79 22 2c 0d | "mast|erkey",.| |00001de0| 0a 20 20 20 20 20 20 2f | 2f 20 20 20 20 22 6a 64 |. /|/ "jd| |00001df0| 62 63 3a 6f 64 62 63 3a | 6c 6f 63 61 6c 54 65 73 |bc:odbc:|localTes| |00001e00| 74 22 0d 0a 20 20 20 20 | 20 20 2f 2f 20 20 20 20 |t".. | // | |00001e10| 22 73 75 6e 2e 6a 64 62 | 63 2e 6f 64 62 63 2e 4a |"sun.jdb|c.odbc.J| |00001e20| 64 62 63 4f 64 62 63 44 | 72 69 76 65 72 22 20 7d |dbcOdbcD|river" }| |00001e30| 0d 0a 20 20 20 20 7d 3b | 0d 0a 0d 0a 20 20 20 20 |.. };|.... | |00001e40| 2f 2f 20 2a 2a 2a 20 41 | 6c 6c 20 64 65 66 61 75 |// *** A|ll defau| |00001e50| 6c 74 73 20 61 72 65 20 | 66 61 6c 73 65 0d 0a 20 |lts are |false.. | |00001e60| 20 20 20 50 65 72 66 6f | 72 6d 61 6e 63 65 54 65 | Perfo|rmanceTe| |00001e70| 73 74 73 2e 74 65 73 74 | 4d 65 74 61 44 61 74 61 |sts.test|MetaData| |00001e80| 20 3d 20 66 61 6c 73 65 | 3b 0d 0a 20 20 20 20 50 | = false|;.. P| |00001e90| 65 72 66 6f 72 6d 61 6e | 63 65 54 65 73 74 73 2e |erforman|ceTests.| |00001ea0| 74 65 73 74 53 74 72 69 | 6e 67 73 20 3d 20 66 61 |testStri|ngs = fa| |00001eb0| 6c 73 65 3b 0d 0a 20 20 | 20 20 50 65 72 66 6f 72 |lse;.. | Perfor| |00001ec0| 6d 61 6e 63 65 54 65 73 | 74 73 2e 74 65 73 74 42 |manceTes|ts.testB| |00001ed0| 4c 4f 62 73 20 3d 20 74 | 72 75 65 3b 0d 0a 20 20 |LObs = t|rue;.. | |00001ee0| 20 20 50 65 72 66 6f 72 | 6d 61 6e 63 65 54 65 73 | Perfor|manceTes| |00001ef0| 74 73 2e 74 65 73 74 4e | 75 6d 62 65 72 73 20 3d |ts.testN|umbers =| |00001f00| 20 66 61 6c 73 65 3b 0d | 0a 20 20 20 20 50 65 72 | false;.|. Per| |00001f10| 66 6f 72 6d 61 6e 63 65 | 54 65 73 74 73 2e 74 65 |formance|Tests.te| |00001f20| 73 74 44 61 74 65 73 20 | 3d 20 66 61 6c 73 65 3b |stDates |= false;| |00001f30| 0d 0a 20 20 20 20 50 65 | 72 66 6f 72 6d 61 6e 63 |.. Pe|rformanc| |00001f40| 65 54 65 73 74 73 2e 74 | 65 73 74 50 72 6f 63 65 |eTests.t|estProce| |00001f50| 64 75 72 65 73 20 3d 20 | 66 61 6c 73 65 3b 0d 0a |dures = |false;..| |00001f60| 0d 0a 20 20 20 20 2f 2f | 20 2a 2a 2a 20 41 6c 6c |.. //| *** All| |00001f70| 20 64 65 66 61 75 6c 74 | 73 20 61 72 65 20 66 61 | default|s are fa| |00001f80| 6c 73 65 0d 0a 20 20 20 | 20 50 65 72 66 6f 72 6d |lse.. | Perform| |00001f90| 61 6e 63 65 54 65 73 74 | 73 2e 74 65 73 74 31 42 |anceTest|s.test1B| |00001fa0| 79 74 65 42 6c 6f 62 73 | 20 3d 20 66 61 6c 73 65 |yteBlobs| = false| |00001fb0| 3b 20 20 2f 2f 20 65 78 | 63 72 75 63 69 61 74 65 |; // ex|cruciate| |00001fc0| 6c 79 20 73 6c 6f 77 0d | 0a 20 20 20 20 50 65 72 |ly slow.|. Per| |00001fd0| 66 6f 72 6d 61 6e 63 65 | 54 65 73 74 73 2e 74 65 |formance|Tests.te| |00001fe0| 73 74 31 30 42 79 74 65 | 42 6c 6f 62 73 20 3d 20 |st10Byte|Blobs = | |00001ff0| 66 61 6c 73 65 3b 20 2f | 2f 20 74 6f 6f 20 73 6c |false; /|/ too sl| |00002000| 6f 77 0d 0a 20 20 20 20 | 50 65 72 66 6f 72 6d 61 |ow.. |Performa| |00002010| 6e 63 65 54 65 73 74 73 | 2e 74 65 73 74 31 30 30 |nceTests|.test100| |00002020| 42 79 74 65 42 6c 6f 62 | 73 20 3d 20 66 61 6c 73 |ByteBlob|s = fals| |00002030| 65 3b 20 20 0d 0a 20 20 | 20 20 50 65 72 66 6f 72 |e; .. | Perfor| |00002040| 6d 61 6e 63 65 54 65 73 | 74 73 2e 74 65 73 74 31 |manceTes|ts.test1| |00002050| 30 30 30 42 79 74 65 42 | 6c 6f 62 73 20 3d 20 66 |000ByteB|lobs = f| |00002060| 61 6c 73 65 3b 20 0d 0a | 20 20 20 20 50 65 72 66 |alse; ..| Perf| |00002070| 6f 72 6d 61 6e 63 65 54 | 65 73 74 73 2e 74 65 73 |ormanceT|ests.tes| |00002080| 74 31 30 30 30 30 42 79 | 74 65 42 6c 6f 62 73 20 |t10000By|teBlobs | |00002090| 3d 20 74 72 75 65 3b 20 | 0d 0a 20 20 20 20 50 65 |= true; |.. Pe| |000020a0| 72 66 6f 72 6d 61 6e 63 | 65 54 65 73 74 73 2e 74 |rformanc|eTests.t| |000020b0| 65 73 74 31 30 30 30 30 | 30 42 79 74 65 42 6c 6f |est10000|0ByteBlo| |000020c0| 62 73 20 3d 20 66 61 6c | 73 65 3b 0d 0a 0d 0a 20 |bs = fal|se;.... | |000020d0| 20 20 20 2f 2f 20 2a 2a | 2a 20 41 6c 6c 20 64 65 | // **|* All de| |000020e0| 66 61 75 6c 74 73 20 61 | 72 65 20 66 61 6c 73 65 |faults a|re false| |000020f0| 0d 0a 20 20 20 20 50 65 | 72 66 6f 72 6d 61 6e 63 |.. Pe|rformanc| |00002100| 65 54 65 73 74 73 2e 74 | 65 73 74 31 43 68 61 72 |eTests.t|est1Char| |00002110| 53 74 72 69 6e 67 73 20 | 3d 20 66 61 6c 73 65 3b |Strings |= false;| |00002120| 20 2f 2f 20 74 6f 6f 20 | 73 6c 6f 77 0d 0a 20 20 | // too |slow.. | |00002130| 20 20 50 65 72 66 6f 72 | 6d 61 6e 63 65 54 65 73 | Perfor|manceTes| |00002140| 74 73 2e 74 65 73 74 31 | 30 43 68 61 72 53 74 72 |ts.test1|0CharStr| |00002150| 69 6e 67 73 20 3d 20 66 | 61 6c 73 65 3b 20 0d 0a |ings = f|alse; ..| |00002160| 20 20 20 20 50 65 72 66 | 6f 72 6d 61 6e 63 65 54 | Perf|ormanceT| |00002170| 65 73 74 73 2e 74 65 73 | 74 31 30 30 43 68 61 72 |ests.tes|t100Char| |00002180| 53 74 72 69 6e 67 73 20 | 3d 20 66 61 6c 73 65 3b |Strings |= false;| |00002190| 0d 0a 20 20 20 20 50 65 | 72 66 6f 72 6d 61 6e 63 |.. Pe|rformanc| |000021a0| 65 54 65 73 74 73 2e 74 | 65 73 74 31 30 30 30 43 |eTests.t|est1000C| |000021b0| 68 61 72 53 74 72 69 6e | 67 73 20 3d 20 66 61 6c |harStrin|gs = fal| |000021c0| 73 65 3b 0d 0a 20 20 20 | 20 50 65 72 66 6f 72 6d |se;.. | Perform| |000021d0| 61 6e 63 65 54 65 73 74 | 73 2e 74 65 73 74 31 30 |anceTest|s.test10| |000021e0| 30 30 30 43 68 61 72 53 | 74 72 69 6e 67 73 20 3d |000CharS|trings =| |000021f0| 20 66 61 6c 73 65 3b 0d | 0a 0d 0a 20 20 20 20 2f | false;.|... /| |00002200| 2f 20 2a 2a 2a 20 44 65 | 66 61 75 6c 74 20 74 65 |/ *** De|fault te| |00002210| 73 74 44 61 74 61 53 69 | 7a 65 20 69 73 20 31 2c |stDataSi|ze is 1,| |00002220| 30 30 30 0d 0a 20 20 20 | 20 50 65 72 66 6f 72 6d |000.. | Perform| |00002230| 61 6e 63 65 54 65 73 74 | 73 2e 74 65 73 74 44 61 |anceTest|s.testDa| |00002240| 74 61 53 69 7a 65 20 3d | 20 31 30 30 30 30 30 3b |taSize =| 100000;| |00002250| 0d 0a 0d 0a 20 20 20 20 | 2f 2f 20 2a 2a 2a 20 41 |.... |// *** A| |00002260| 6c 6c 20 64 65 66 61 75 | 6c 74 73 20 61 72 65 20 |ll defau|lts are | |00002270| 66 61 6c 73 65 0d 0a 20 | 20 20 20 50 65 72 66 6f |false.. | Perfo| |00002280| 72 6d 61 6e 63 65 54 65 | 73 74 73 2e 65 6e 61 62 |rmanceTe|sts.enab| |00002290| 6c 65 41 75 74 6f 43 6f | 6d 6d 69 74 20 3d 20 66 |leAutoCo|mmit = f| |000022a0| 61 6c 73 65 3b 0d 0a 20 | 20 20 20 50 65 72 66 6f |alse;.. | Perfo| |000022b0| 72 6d 61 6e 63 65 54 65 | 73 74 73 2e 65 6e 61 62 |rmanceTe|sts.enab| |000022c0| 6c 65 44 72 69 76 65 72 | 4d 61 6e 61 67 65 72 4c |leDriver|ManagerL| |000022d0| 6f 67 53 74 72 65 61 6d | 20 3d 20 66 61 6c 73 65 |ogStream| = false| |000022e0| 3b 0d 0a 0d 0a 20 20 20 | 20 50 65 72 66 6f 72 6d |;.... | Perform| |000022f0| 61 6e 63 65 54 65 73 74 | 73 2e 63 68 61 72 61 63 |anceTest|s.charac| |00002300| 74 65 72 53 65 74 20 3d | 20 6e 75 6c 6c 3b 20 20 |terSet =| null; | |00002310| 2f 2f 20 75 73 65 20 64 | 72 69 76 65 72 20 64 65 |// use d|river de| |00002320| 66 61 75 6c 74 73 2c 20 | 69 63 20 75 73 65 73 20 |faults, |ic uses | |00002330| 49 53 4f 20 38 38 35 39 | 2d 31 2c 20 73 6f 6d 65 |ISO 8859|-1, some| |00002340| 20 75 73 65 20 41 53 43 | 49 49 0d 0a 20 20 20 20 | use ASC|II.. | |00002350| 50 65 72 66 6f 72 6d 61 | 6e 63 65 54 65 73 74 73 |Performa|nceTests| |00002360| 2e 63 68 61 72 61 63 74 | 65 72 20 3d 20 27 58 27 |.charact|er = 'X'| |00002370| 3b 20 0d 0a 0d 0a 20 20 | 20 20 2f 2f 20 2a 2a 2a |; .... | // ***| |00002380| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********| |00002390| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********| |000023a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********| |000023b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********| |000023c0| 2a 2a 2a 2a 2a 0d 0a 20 | 20 20 20 2f 2f 20 2a 2a |*****.. | // **| |000023d0| 2a 20 45 73 74 61 62 6c | 69 73 68 20 61 20 70 72 |* Establ|ish a pr| |000023e0| 69 6e 74 20 73 74 72 65 | 61 6d 20 77 68 65 72 65 |int stre|am where| |000023f0| 20 70 65 72 66 6f 72 6d | 61 6e 63 65 20 74 65 73 | perform|ance tes| |00002400| 74 20 72 65 73 75 6c 74 | 73 20 61 72 65 20 77 72 |t result|s are wr| |00002410| 69 74 74 65 6e 2e 0d 0a | 20 20 20 20 2f 2f 20 2a |itten...| // *| |00002420| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********| |00002430| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********| |00002440| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********| |00002450| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********| |00002460| 2a 2a 2a 2a 2a 2a 2a 0d | 0a 0d 0a 20 20 20 20 2f |*******.|... /| |00002470| 2f 20 4f 75 74 70 75 74 | 20 66 69 6c 65 20 66 6f |/ Output| file fo| |00002480| 72 20 74 65 73 74 20 72 | 65 73 75 6c 74 73 2e 0d |r test r|esults..| |00002490| 0a 20 20 20 20 2f 2f 20 | 49 66 20 74 68 69 73 20 |. // |If this | |000024a0| 69 73 20 73 65 74 20 74 | 6f 20 6e 75 6c 6c 20 74 |is set t|o null t| |000024b0| 68 65 6e 20 53 79 73 74 | 65 6d 2e 6f 75 74 20 69 |hen Syst|em.out i| |000024c0| 73 20 75 73 65 64 2e 0d | 0a 20 20 20 20 2f 2f 20 |s used..|. // | |000024d0| 41 20 4a 42 75 69 6c 64 | 65 72 20 50 72 6f 6a 65 |A JBuild|er Proje| |000024e0| 63 74 20 6f 72 20 49 44 | 45 20 73 65 74 74 69 6e |ct or ID|E settin| |000024f0| 67 20 63 6f 6e 74 72 6f | 6c 73 20 77 68 65 74 68 |g contro|ls wheth| |00002500| 65 72 20 6f 72 20 6e 6f | 74 20 53 79 73 74 65 6d |er or no|t System| |00002510| 2e 6f 75 74 0d 0a 20 20 | 20 20 2f 2f 20 67 6f 65 |.out.. | // goe| |00002520| 73 20 74 6f 20 74 68 65 | 20 45 78 65 63 75 74 69 |s to the| Executi| |00002530| 6f 6e 20 4c 6f 67 20 6f | 72 20 74 6f 20 74 68 65 |on Log o|r to the| |00002540| 20 44 4f 53 20 77 69 6e | 64 6f 77 2e 0d 0a 20 20 | DOS win|dow... | |00002550| 20 20 2f 2f 20 54 79 70 | 69 63 61 6c 20 76 61 6c | // Typ|ical val| |00002560| 75 65 20 6f 6e 20 57 69 | 6e 64 6f 77 73 20 69 73 |ue on Wi|ndows is| |00002570| 20 22 64 3a 5c 5c 4f 75 | 74 70 75 74 2e 74 78 74 | "d:\\Ou|tput.txt| |00002580| 22 0d 0a 20 20 20 20 50 | 65 72 66 6f 72 6d 61 6e |".. P|erforman| |00002590| 63 65 54 65 73 74 73 2e | 6f 75 74 70 75 74 46 69 |ceTests.|outputFi| |000025a0| 6c 65 4e 61 6d 65 20 3d | 20 22 64 3a 5c 5c 4f 75 |leName =| "d:\\Ou| |000025b0| 74 70 75 74 2e 74 78 74 | 22 3b 0d 0a 20 20 20 20 |tput.txt|";.. | |000025c0| 2f 2f 20 50 65 72 66 6f | 72 6d 61 6e 63 65 54 65 |// Perfo|rmanceTe| |000025d0| 73 74 73 2e 6f 75 74 70 | 75 74 46 69 6c 65 4e 61 |sts.outp|utFileNa| |000025e0| 6d 65 20 3d 20 6e 75 6c | 6c 3b 0d 0a 0d 0a 20 20 |me = nul|l;.... | |000025f0| 20 20 2f 2f 20 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a | // ***|********| |00002600| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 20 0d |********|****** .| |00002610| 0a 20 20 20 20 2f 2f 20 | 2a 2a 2a 20 4f 6b 2c 20 |. // |*** Ok, | |00002620| 72 75 6e 20 74 68 65 20 | 74 65 73 74 73 20 2a 2a |run the |tests **| |00002630| 2a 0d 0a 20 20 20 20 2f | 2f 20 2a 2a 2a 2a 2a 2a |*.. /|/ ******| |00002640| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********| |00002650| 2a 2a 2a 0d 0a 20 20 20 | 20 50 65 72 66 6f 72 6d |***.. | Perform| |00002660| 61 6e 63 65 54 65 73 74 | 73 2e 72 75 6e 20 28 29 |anceTest|s.run ()| |00002670| 3b 0d 0a 20 20 7d 0d 0a | 7d 0d 0a 3c 2f 70 72 65 |;.. }..|}..</pre| |00002680| 3e 0d 0a 0d 0a 50 4b 03 | 04 0a 00 00 00 00 00 18 |>....PK.|........| |00002690| 86 35 25 fd b6 4b 74 3e | 57 00 00 3e 57 00 00 1e |.5%..Kt>|W..>W...| |000026a0| 00 00 00 64 6f 63 73 2f | 65 78 61 6d 70 6c 65 73 |...docs/|examples| |000026b0| 2f 46 69 72 73 74 45 78 | 61 6d 70 6c 65 2e 74 78 |/FirstEx|ample.tx| |000026c0| 74 3c 70 72 65 3e 0d 0a | 2f 2f 20 43 6f 70 79 72 |t<pre>..|// Copyr| |000026d0| 69 67 68 74 20 49 6e 74 | 65 72 42 61 73 65 20 53 |ight Int|erBase S| |000026e0| 6f 66 74 77 61 72 65 20 | 43 6f 72 70 6f 72 61 74 |oftware |Corporat| |000026f0| 69 6f 6e 2c 20 31 39 39 | 38 2e 0d 0a 2f 2f 20 57 |ion, 199|8...// W| |00002700| 72 69 74 74 65 6e 20 62 | 79 20 69 6e 70 72 69 73 |ritten b|y inpris| |00002710| 65 2e 69 6e 74 65 72 62 | 61 73 65 2e 69 6e 74 65 |e.interb|ase.inte| |00002720| 72 63 6c 69 65 6e 74 2e | 72 26 64 2e 50 61 75 6c |rclient.|r&d.Paul| |00002730| 4f 73 74 6c 65 72 20 3a | 2d 29 0d 0a 2f 2f 0d 0a |Ostler :|-)..//..| |00002740| 2f 2f 20 41 20 73 6d 61 | 6c 6c 20 61 70 70 6c 69 |// A sma|ll appli| |00002750| 63 61 74 69 6f 6e 20 74 | 6f 20 64 65 6d 6f 6e 73 |cation t|o demons| |00002760| 74 72 61 74 65 20 62 61 | 73 69 63 2c 20 62 75 74 |trate ba|sic, but| |00002770| 20 6e 6f 74 20 6e 65 63 | 65 73 73 61 72 69 6c 79 | not nec|essarily| |00002780| 20 73 69 6d 70 6c 65 2c | 20 4a 44 42 43 20 66 65 | simple,| JDBC fe| |00002790| 61 74 75 72 65 73 2e 0d | 0a 2f 2f 0d 0a 2f 2f 20 |atures..|.//..// | |000027a0| 4e 6f 74 65 3a 20 79 6f | 75 20 77 69 6c 6c 20 6e |Note: yo|u will n| |000027b0| 65 65 64 20 74 6f 20 68 | 61 72 64 77 69 72 65 20 |eed to h|ardwire | |000027c0| 74 68 65 20 70 61 74 68 | 20 74 6f 20 79 6f 75 72 |the path| to your| |000027d0| 20 63 6f 70 79 20 6f 66 | 20 65 6d 70 6c 6f 79 65 | copy of| employe| |000027e0| 65 2e 67 64 62 0d 0a 2f | 2f 20 20 20 20 20 20 20 |e.gdb../|/ | |000027f0| 61 73 20 77 65 6c 6c 20 | 61 73 20 73 75 70 70 6c |as well |as suppl| |00002800| 79 20 61 20 75 73 65 72 | 2f 70 61 73 73 77 6f 72 |y a user|/passwor| |00002810| 64 20 69 6e 20 74 68 65 | 20 63 6f 64 65 20 62 65 |d in the| code be| |00002820| 6c 6f 77 20 61 74 20 74 | 68 65 0d 0a 2f 2f 20 20 |low at t|he..// | |00002830| 20 20 20 20 20 62 65 67 | 69 6e 6e 69 6e 67 20 6f | beg|inning o| |00002840| 66 20 6d 65 74 68 6f 64 | 20 6d 61 69 6e 28 29 2e |f method| main().| |00002850| 0d 0a 70 75 62 6c 69 63 | 20 63 6c 61 73 73 20 46 |..public| class F| |00002860| 69 72 73 74 45 78 61 6d | 70 6c 65 0d 0a 7b 0d 0a |irstExam|ple..{..| |00002870| 20 20 2f 2f 20 4d 61 6b | 65 20 61 20 63 6f 6e 6e | // Mak|e a conn| |00002880| 65 63 74 69 6f 6e 20 74 | 6f 20 61 6e 20 65 6d 70 |ection t|o an emp| |00002890| 6c 6f 79 65 65 2e 67 64 | 62 20 6f 6e 20 79 6f 75 |loyee.gd|b on you| |000028a0| 72 20 6c 6f 63 61 6c 20 | 6d 61 63 68 69 6e 65 2c |r local |machine,| |000028b0| 0d 0a 20 20 2f 2f 20 61 | 6e 64 20 64 65 6d 6f 6e |.. // a|nd demon| |000028c0| 73 74 72 61 74 65 20 62 | 61 73 69 63 20 4a 44 42 |strate b|asic JDB| |000028d0| 43 20 66 65 61 74 75 72 | 65 73 2e 0d 0a 20 20 2f |C featur|es... /| |000028e0| 2f 20 4e 6f 74 69 63 65 | 20 74 68 61 74 20 6d 61 |/ Notice| that ma| |000028f0| 69 6e 28 29 20 75 73 65 | 73 20 69 74 73 20 6f 77 |in() use|s its ow| |00002900| 6e 20 6c 6f 63 61 6c 20 | 76 61 72 69 61 62 6c 65 |n local |variable| |00002910| 73 20 72 61 74 68 65 72 | 20 74 68 61 6e 0d 0a 20 |s rather| than.. | |00002920| 20 2f 2f 20 73 74 61 74 | 69 63 20 63 6c 61 73 73 | // stat|ic class| |00002930| 20 76 61 72 69 61 62 6c | 65 73 2c 20 73 6f 20 69 | variabl|es, so i| |00002940| 74 20 6e 65 65 64 20 6e | 6f 74 20 62 65 20 73 79 |t need n|ot be sy| |00002950| 6e 63 68 72 6f 6e 69 7a | 65 64 2e 0d 0a 20 20 70 |nchroniz|ed... p| |00002960| 75 62 6c 69 63 20 73 74 | 61 74 69 63 20 76 6f 69 |ublic st|atic voi| |00002970| 64 20 6d 61 69 6e 20 28 | 53 74 72 69 6e 67 20 61 |d main (|String a| |00002980| 72 67 73 5b 5d 29 0d 0a | 20 20 7b 0d 0a 20 20 20 |rgs[])..| {.. | |00002990| 20 2f 2f 20 4d 6f 64 69 | 66 79 20 74 68 65 20 66 | // Modi|fy the f| |000029a0| 6f 6c 6c 6f 77 69 6e 67 | 20 68 61 72 64 77 69 72 |ollowing| hardwir| |000029b0| 65 64 20 73 65 74 74 69 | 6e 67 73 20 66 6f 72 20 |ed setti|ngs for | |000029c0| 79 6f 75 72 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |your env|ironment| |000029d0| 2e 0d 0a 20 20 20 20 2f | 2f 20 4e 6f 74 65 3a 20 |... /|/ Note: | |000029e0| 6c 6f 63 61 6c 68 6f 73 | 74 20 69 73 20 61 20 54 |localhos|t is a T| |000029f0| 43 50 2f 49 50 20 6b 65 | 79 77 6f 72 64 20 77 68 |CP/IP ke|yword wh| |00002a00| 69 63 68 20 72 65 73 6f | 6c 76 65 73 20 74 6f 20 |ich reso|lves to | |00002a10| 79 6f 75 72 20 6c 6f 63 | 61 6c 20 6d 61 63 68 69 |your loc|al machi| |00002a20| 6e 65 27 73 20 49 50 20 | 61 64 64 72 65 73 73 2e |ne's IP |address.| |00002a30| 0d 0a 20 20 20 20 2f 2f | 20 20 20 20 20 20 20 49 |.. //| I| |00002a40| 66 20 6c 6f 63 61 6c 68 | 6f 73 74 20 69 73 20 6e |f localh|ost is n| |00002a50| 6f 74 20 72 65 63 6f 67 | 6e 69 7a 65 64 2c 20 74 |ot recog|nized, t| |00002a60| 72 79 20 75 73 69 6e 67 | 20 79 6f 75 72 20 6c 6f |ry using| your lo| |00002a70| 63 61 6c 20 6d 61 63 68 | 69 6e 65 27 73 20 6e 61 |cal mach|ine's na| |00002a80| 6d 65 20 6f 72 0d 0a 20 | 20 20 20 2f 2f 20 20 20 |me or.. | // | |00002a90| 20 20 20 20 74 68 65 20 | 6c 6f 6f 70 62 61 63 6b | the |loopback| |00002aa0| 20 49 50 20 61 64 64 72 | 65 73 73 20 31 32 37 2e | IP addr|ess 127.| |00002ab0| 30 2e 30 2e 31 20 69 6e | 20 70 6c 61 63 65 20 6f |0.0.1 in| place o| |00002ac0| 66 20 6c 6f 63 61 6c 68 | 6f 73 74 2e 0d 0a 20 20 |f localh|ost... | |00002ad0| 20 20 53 74 72 69 6e 67 | 20 64 61 74 61 62 61 73 | String| databas| |00002ae0| 65 55 52 4c 20 3d 20 22 | 6a 64 62 63 3a 69 6e 74 |eURL = "|jdbc:int| |00002af0| 65 72 62 61 73 65 3a 2f | 2f 6c 6f 63 61 6c 68 6f |erbase:/|/localho| |00002b00| 73 74 2f 64 3a 2f 64 61 | 74 61 62 61 73 65 73 2f |st/d:/da|tabases/| |00002b10| 65 6d 70 6c 6f 79 65 65 | 2e 67 64 62 22 3b 0d 0a |employee|.gdb";..| |00002b20| 20 20 20 20 53 74 72 69 | 6e 67 20 75 73 65 72 20 | Stri|ng user | |00002b30| 3d 20 22 73 79 73 64 62 | 61 22 3b 0d 0a 20 20 20 |= "sysdb|a";.. | |00002b40| 20 53 74 72 69 6e 67 20 | 70 61 73 73 77 6f 72 64 | String |password| |00002b50| 20 3d 20 22 6d 61 73 74 | 65 72 6b 65 79 22 3b 0d | = "mast|erkey";.| |00002b60| 0a 20 20 20 20 53 74 72 | 69 6e 67 20 64 72 69 76 |. Str|ing driv| |00002b70| 65 72 4e 61 6d 65 20 3d | 20 22 69 6e 74 65 72 62 |erName =| "interb| |00002b80| 61 73 65 2e 69 6e 74 65 | 72 63 6c 69 65 6e 74 2e |ase.inte|rclient.| |00002b90| 44 72 69 76 65 72 22 3b | 0d 0a 0d 0a 20 20 20 20 |Driver";|.... | |00002ba0| 2f 2f 20 41 73 20 61 6e | 20 65 78 65 72 63 69 73 |// As an| exercis| |00002bb0| 65 20 74 6f 20 74 68 65 | 20 72 65 61 64 65 72 2c |e to the| reader,| |00002bc0| 20 61 64 64 20 73 6f 6d | 65 20 63 6f 64 65 20 77 | add som|e code w| |00002bd0| 68 69 63 68 20 65 78 74 | 72 61 63 74 73 20 64 61 |hich ext|racts da| |00002be0| 74 61 62 61 73 65 55 52 | 4c 2c 0d 0a 20 20 20 20 |tabaseUR|L,.. | |00002bf0| 2f 2f 20 75 73 65 72 2c | 20 61 6e 64 20 70 61 73 |// user,| and pas| |00002c00| 73 77 6f 72 64 20 66 72 | 6f 6d 20 74 68 65 20 70 |sword fr|om the p| |00002c10| 72 6f 67 72 61 6d 20 61 | 72 67 73 5b 5d 20 74 6f |rogram a|rgs[] to| |00002c20| 20 6d 61 69 6e 28 29 2e | 0d 0a 20 20 20 20 2f 2f | main().|.. //| |00002c30| 20 41 73 20 61 20 66 75 | 72 74 68 65 72 20 65 78 | As a fu|rther ex| |00002c40| 65 72 63 69 73 65 2c 20 | 61 6c 6c 6f 77 20 74 68 |ercise, |allow th| |00002c50| 65 20 64 72 69 76 65 72 | 20 6e 61 6d 65 20 74 6f |e driver| name to| |00002c60| 20 62 65 20 70 61 73 73 | 65 64 20 61 73 20 77 65 | be pass|ed as we| |00002c70| 6c 6c 2c 0d 0a 20 20 20 | 20 2f 2f 20 61 6e 64 20 |ll,.. | // and | |00002c80| 6d 6f 64 69 66 79 20 74 | 68 65 20 63 6f 64 65 20 |modify t|he code | |00002c90| 62 65 6c 6f 77 20 74 6f | 20 75 73 65 20 64 72 69 |below to| use dri| |00002ca0| 76 65 72 4e 61 6d 65 20 | 72 61 74 68 65 72 20 74 |verName |rather t| |00002cb0| 68 61 6e 20 74 68 65 20 | 68 61 72 64 77 69 72 65 |han the |hardwire| |00002cc0| 64 0d 0a 20 20 20 20 2f | 2f 20 73 74 72 69 6e 67 |d.. /|/ string| |00002cd0| 20 22 69 6e 74 65 72 62 | 61 73 65 2e 69 6e 74 65 | "interb|ase.inte| |00002ce0| 72 63 6c 69 65 6e 74 2e | 44 72 69 76 65 72 22 20 |rclient.|Driver" | |00002cf0| 73 6f 20 74 68 61 74 20 | 74 68 69 73 20 63 6f 64 |so that |this cod| |00002d00| 65 20 62 65 63 6f 6d 65 | 73 0d 0a 20 20 20 20 2f |e become|s.. /| |00002d10| 2f 20 64 72 69 76 65 72 | 20 69 6e 64 65 70 65 6e |/ driver| indepen| |00002d20| 64 65 6e 74 2e 20 20 48 | 6f 77 65 76 65 72 2c 20 |dent. H|owever, | |00002d30| 74 68 65 20 63 6f 64 65 | 20 77 69 6c 6c 20 73 74 |the code| will st| |00002d40| 69 6c 6c 20 72 65 6c 79 | 20 6f 6e 20 74 68 65 0d |ill rely| on the.| |00002d50| 0a 20 20 20 20 2f 2f 20 | 70 72 65 64 65 66 69 6e |. // |predefin| |00002d60| 65 64 20 74 61 62 6c 65 | 20 73 74 72 75 63 74 75 |ed table| structu| |00002d70| 72 65 20 6f 66 20 65 6d | 70 6c 6f 79 65 65 2e 67 |re of em|ployee.g| |00002d80| 64 62 2e 0d 0a 0d 0a 20 | 20 20 20 2f 2f 20 53 65 |db..... | // Se| |00002d90| 65 20 63 6f 6d 6d 65 6e | 74 20 61 62 6f 75 74 20 |e commen|t about | |00002da0| 63 6c 6f 73 69 6e 67 20 | 4a 44 42 43 20 6f 62 6a |closing |JDBC obj| |00002db0| 65 63 74 73 20 61 74 20 | 74 68 65 20 65 6e 64 20 |ects at |the end | |00002dc0| 6f 66 20 74 68 69 73 20 | 6d 61 69 6e 28 29 20 6d |of this |main() m| |00002dd0| 65 74 68 6f 64 2e 0d 0a | 20 20 20 20 53 79 73 74 |ethod...| Syst| |00002de0| 65 6d 2e 72 75 6e 46 69 | 6e 61 6c 69 7a 65 72 73 |em.runFi|nalizers| |00002df0| 4f 6e 45 78 69 74 20 28 | 74 72 75 65 29 3b 0d 0a |OnExit (|true);..| |00002e00| 0d 0a 20 20 20 20 2f 2f | 20 48 65 72 65 20 61 72 |.. //| Here ar| |00002e10| 65 20 74 68 65 20 4a 44 | 42 43 20 6f 62 6a 65 63 |e the JD|BC objec| |00002e20| 74 73 20 77 65 27 72 65 | 20 67 6f 69 6e 67 20 74 |ts we're| going t| |00002e30| 6f 20 77 6f 72 6b 20 77 | 69 74 68 2e 0d 0a 20 20 |o work w|ith... | |00002e40| 20 20 2f 2f 20 57 65 27 | 72 65 20 64 65 66 69 6e | // We'|re defin| |00002e50| 69 6e 67 20 74 68 65 6d | 20 6f 75 74 73 69 64 65 |ing them| outside| |00002e60| 20 74 68 65 20 73 63 6f | 70 65 20 6f 66 20 74 68 | the sco|pe of th| |00002e70| 65 20 74 72 79 20 62 6c | 6f 63 6b 20 62 65 63 61 |e try bl|ock beca| |00002e80| 75 73 65 0d 0a 20 20 20 | 20 2f 2f 20 74 68 65 79 |use.. | // they| |00002e90| 20 6e 65 65 64 20 74 6f | 20 62 65 20 76 69 73 69 | need to| be visi| |00002ea0| 62 6c 65 20 69 6e 20 61 | 20 66 69 6e 61 6c 6c 79 |ble in a| finally| |00002eb0| 20 63 6c 61 75 73 65 20 | 77 68 69 63 68 20 77 69 | clause |which wi| |00002ec0| 6c 6c 20 62 65 20 75 73 | 65 64 0d 0a 20 20 20 20 |ll be us|ed.. | |00002ed0| 2f 2f 20 74 6f 20 63 6c | 6f 73 65 20 65 76 65 72 |// to cl|ose ever| |00002ee0| 79 74 68 69 6e 67 20 77 | 68 65 6e 20 77 65 20 61 |ything w|hen we a| |00002ef0| 72 65 20 64 6f 6e 65 2e | 0d 0a 20 20 20 20 2f 2f |re done.|.. //| |00002f00| 20 54 68 65 20 66 69 6e | 61 6c 6c 79 20 63 6c 61 | The fin|ally cla| |00002f10| 75 73 65 20 77 69 6c 6c | 20 62 65 20 65 78 65 63 |use will| be exec| |00002f20| 75 74 65 64 20 65 76 65 | 6e 20 69 66 20 61 6e 20 |uted eve|n if an | |00002f30| 65 78 63 65 70 74 69 6f | 6e 20 6f 63 63 75 72 73 |exceptio|n occurs| |00002f40| 2e 0d 0a 20 20 20 20 6a | 61 76 61 2e 73 71 6c 2e |... j|ava.sql.| |00002f50| 44 72 69 76 65 72 20 64 | 20 3d 20 6e 75 6c 6c 3b |Driver d| = null;| |00002f60| 0d 0a 20 20 20 20 6a 61 | 76 61 2e 73 71 6c 2e 43 |.. ja|va.sql.C| |00002f70| 6f 6e 6e 65 63 74 69 6f | 6e 20 63 20 3d 20 6e 75 |onnectio|n c = nu| |00002f80| 6c 6c 3b 0d 0a 20 20 20 | 20 6a 61 76 61 2e 73 71 |ll;.. | java.sq| |00002f90| 6c 2e 53 74 61 74 65 6d | 65 6e 74 20 73 20 3d 20 |l.Statem|ent s = | |00002fa0| 6e 75 6c 6c 3b 0d 0a 20 | 20 20 20 6a 61 76 61 2e |null;.. | java.| |00002fb0| 73 71 6c 2e 52 65 73 75 | 6c 74 53 65 74 20 72 73 |sql.Resu|ltSet rs| |00002fc0| 20 3d 20 6e 75 6c 6c 3b | 0d 0a 0d 0a 20 20 20 20 | = null;|.... | |00002fd0| 2f 2f 20 41 6e 79 20 72 | 65 74 75 72 6e 20 66 72 |// Any r|eturn fr| |00002fe0| 6f 6d 20 74 68 69 73 20 | 74 72 79 20 62 6c 6f 63 |om this |try bloc| |00002ff0| 6b 20 77 69 6c 6c 20 66 | 69 72 73 74 20 65 78 65 |k will f|irst exe| |00003000| 63 75 74 65 20 74 68 65 | 20 66 69 6e 61 6c 6c 79 |cute the| finally| |00003010| 20 63 6c 61 75 73 65 0d | 0a 20 20 20 20 2f 2f 20 | clause.|. // | |00003020| 74 6f 77 61 72 64 73 20 | 74 68 65 20 62 6f 74 74 |towards |the bott| |00003030| 6f 6d 20 6f 66 20 74 68 | 69 73 20 66 69 6c 65 2e |om of th|is file.| |00003040| 0d 0a 20 20 20 20 74 72 | 79 20 7b 0d 0a 0d 0a 20 |.. tr|y {.... | |00003050| 20 20 20 20 20 2f 2f 20 | 4c 65 74 27 73 20 74 72 | // |Let's tr| |00003060| 79 20 74 6f 20 72 65 67 | 69 73 74 65 72 20 74 68 |y to reg|ister th| |00003070| 65 20 49 6e 74 65 72 43 | 6c 69 65 6e 74 20 4a 44 |e InterC|lient JD| |00003080| 42 43 20 64 72 69 76 65 | 72 20 77 69 74 68 20 74 |BC drive|r with t| |00003090| 68 65 20 64 72 69 76 65 | 72 20 6d 61 6e 61 67 65 |he drive|r manage| |000030a0| 72 0d 0a 20 20 20 20 20 | 20 2f 2f 20 75 73 69 6e |r.. | // usin| |000030b0| 67 20 6f 6e 65 20 6f 66 | 20 76 61 72 69 6f 75 73 |g one of| various| |000030c0| 20 72 65 67 69 73 74 72 | 61 74 69 6f 6e 20 61 6c | registr|ation al| |000030d0| 74 65 72 6e 61 74 69 76 | 65 73 2e 2e 2e 0d 0a 20 |ternativ|es..... | |000030e0| 20 20 20 20 20 69 6e 74 | 20 72 65 67 69 73 74 72 | int| registr| |000030f0| 61 74 69 6f 6e 41 6c 74 | 65 72 6e 61 74 69 76 65 |ationAlt|ernative| |00003100| 20 3d 20 31 3b 0d 0a 20 | 20 20 20 20 20 73 77 69 | = 1;.. | swi| |00003110| 74 63 68 20 28 72 65 67 | 69 73 74 72 61 74 69 6f |tch (reg|istratio| |00003120| 6e 41 6c 74 65 72 6e 61 | 74 69 76 65 29 20 7b 0d |nAlterna|tive) {.| |00003130| 0a 0d 0a 20 20 20 20 20 | 20 63 61 73 65 20 31 3a |... | case 1:| |00003140| 0d 0a 20 20 20 20 20 20 | 20 20 2f 2f 20 54 68 69 |.. | // Thi| |00003150| 73 20 69 73 20 74 68 65 | 20 73 74 61 6e 64 61 72 |s is the| standar| |00003160| 64 20 61 6c 74 65 72 6e | 61 74 69 76 65 20 61 6e |d altern|ative an| |00003170| 64 20 73 69 6d 70 6c 79 | 20 6c 6f 61 64 73 20 74 |d simply| loads t| |00003180| 68 65 20 64 72 69 76 65 | 72 20 63 6c 61 73 73 2e |he drive|r class.| |00003190| 0d 0a 20 20 20 20 20 20 | 20 20 2f 2f 20 43 6c 61 |.. | // Cla| |000031a0| 73 73 2e 66 6f 72 4e 61 | 6d 65 28 29 20 69 6e 73 |ss.forNa|me() ins| |000031b0| 74 72 75 63 74 73 20 74 | 68 65 20 6a 61 76 61 20 |tructs t|he java | |000031c0| 63 6c 61 73 73 20 6c 6f | 61 64 65 72 20 74 6f 20 |class lo|ader to | |000031d0| 6c 6f 61 64 0d 0a 20 20 | 20 20 20 20 20 20 2f 2f |load.. | //| |000031e0| 20 61 6e 64 20 69 6e 69 | 74 69 61 6c 69 7a 65 20 | and ini|tialize | |000031f0| 61 20 63 6c 61 73 73 2e | 20 20 41 73 20 70 61 72 |a class.| As par| |00003200| 74 20 6f 66 20 74 68 65 | 20 63 6c 61 73 73 20 69 |t of the| class i| |00003210| 6e 69 74 69 61 6c 69 7a | 61 74 69 6f 6e 0d 0a 20 |nitializ|ation.. | |00003220| 20 20 20 20 20 20 20 2f | 2f 20 61 6e 79 20 73 74 | /|/ any st| |00003230| 61 74 69 63 20 63 6c 61 | 75 73 65 73 20 61 73 73 |atic cla|uses ass| |00003240| 6f 63 69 61 74 65 64 20 | 77 69 74 68 20 74 68 65 |ociated |with the| |00003250| 20 63 6c 61 73 73 20 61 | 72 65 20 65 78 65 63 75 | class a|re execu| |00003260| 74 65 64 2e 0d 0a 20 20 | 20 20 20 20 20 20 2f 2f |ted... | //| |00003270| 20 45 76 65 72 79 20 64 | 72 69 76 65 72 20 63 6c | Every d|river cl| |00003280| 61 73 73 20 69 73 20 72 | 65 71 75 69 72 65 64 20 |ass is r|equired | |00003290| 62 79 20 74 68 65 20 6a | 64 62 63 20 73 70 65 63 |by the j|dbc spec| |000032a0| 69 66 69 63 61 74 69 6f | 6e 20 74 6f 20 61 75 74 |ificatio|n to aut| |000032b0| 6f 6d 61 74 69 63 61 6c | 6c 79 0d 0a 20 20 20 20 |omatical|ly.. | |000032c0| 20 20 20 20 2f 2f 20 63 | 72 65 61 74 65 20 61 6e | // c|reate an| |000032d0| 20 69 6e 73 74 61 6e 63 | 65 20 6f 66 20 69 74 73 | instanc|e of its| |000032e0| 65 6c 66 20 61 6e 64 20 | 72 65 67 69 73 74 65 72 |elf and |register| |000032f0| 20 74 68 61 74 20 69 6e | 73 74 61 6e 63 65 20 77 | that in|stance w| |00003300| 69 74 68 20 74 68 65 20 | 64 72 69 76 65 72 0d 0a |ith the |driver..| |00003310| 20 20 20 20 20 20 20 20 | 2f 2f 20 6d 61 6e 61 67 | |// manag| |00003320| 65 72 20 77 68 65 6e 20 | 74 68 65 20 64 72 69 76 |er when |the driv| |00003330| 65 72 20 63 6c 61 73 73 | 20 69 73 20 6c 6f 61 64 |er class| is load| |00003340| 65 64 20 62 79 20 74 68 | 65 20 6a 61 76 61 20 63 |ed by th|e java c| |00003350| 6c 61 73 73 20 6c 6f 61 | 64 65 72 0d 0a 20 20 20 |lass loa|der.. | |00003360| 20 20 20 20 20 2f 2f 20 | 28 74 68 69 73 20 69 73 | // |(this is| |00003370| 20 64 6f 6e 65 20 76 69 | 61 20 61 20 73 74 61 74 | done vi|a a stat| |00003380| 69 63 20 63 6c 61 75 73 | 65 20 61 73 73 6f 63 69 |ic claus|e associ| |00003390| 61 74 65 64 20 77 69 74 | 68 20 74 68 65 20 64 72 |ated wit|h the dr| |000033a0| 69 76 65 72 20 63 6c 61 | 73 73 29 2e 0d 0a 20 20 |iver cla|ss)... | |000033b0| 20 20 20 20 20 20 2f 2f | 0d 0a 20 20 20 20 20 20 | //|.. | |000033c0| 20 20 2f 2f 20 4e 6f 74 | 69 63 65 20 74 68 61 74 | // Not|ice that| |000033d0| 20 74 68 65 20 64 72 69 | 76 65 72 20 6e 61 6d 65 | the dri|ver name| |000033e0| 20 63 6f 75 6c 64 20 68 | 61 76 65 20 62 65 65 6e | could h|ave been| |000033f0| 20 73 75 70 70 6c 69 65 | 64 20 64 79 6e 61 6d 69 | supplie|d dynami| |00003400| 63 61 6c 6c 79 2c 0d 0a | 20 20 20 20 20 20 20 20 |cally,..| | |00003410| 2f 2f 20 73 6f 20 74 68 | 61 74 20 61 6e 20 61 70 |// so th|at an ap| |00003420| 70 6c 69 63 61 74 69 6f | 6e 20 69 73 20 6e 6f 74 |plicatio|n is not| |00003430| 20 68 61 72 64 77 69 72 | 65 64 20 74 6f 20 61 6e | hardwir|ed to an| |00003440| 79 20 70 61 72 74 69 63 | 75 6c 61 72 20 64 72 69 |y partic|ular dri| |00003450| 76 65 72 0d 0a 20 20 20 | 20 20 20 20 20 2f 2f 20 |ver.. | // | |00003460| 61 73 20 77 6f 75 6c 64 | 20 62 65 20 74 68 65 20 |as would| be the | |00003470| 63 61 73 65 20 69 66 20 | 61 20 64 72 69 76 65 72 |case if |a driver| |00003480| 20 63 6f 6e 73 74 72 75 | 63 74 6f 72 20 77 65 72 | constru|ctor wer| |00003490| 65 20 75 73 65 64 2c 20 | 65 67 2e 0d 0a 20 20 20 |e used, |eg... | |000034a0| 20 20 20 20 20 2f 2f 20 | 6e 65 77 20 69 6e 74 65 | // |new inte| |000034b0| 72 62 61 73 65 2e 69 6e | 74 65 72 63 6c 69 65 6e |rbase.in|terclien| |000034c0| 74 2e 44 72 69 76 65 72 | 28 29 2e 0d 0a 20 20 20 |t.Driver|()... | |000034d0| 20 20 20 20 20 74 72 79 | 20 7b 0d 0a 20 20 20 20 | try| {.. | |000034e0| 20 20 20 20 20 20 43 6c | 61 73 73 2e 66 6f 72 4e | Cl|ass.forN| |000034f0| 61 6d 65 20 28 22 69 6e | 74 65 72 62 61 73 65 2e |ame ("in|terbase.| |00003500| 69 6e 74 65 72 63 6c 69 | 65 6e 74 2e 44 72 69 76 |intercli|ent.Driv| |00003510| 65 72 22 29 3b 0d 0a 20 | 20 20 20 20 20 20 20 7d |er");.. | }| |00003520| 0d 0a 20 20 20 20 20 20 | 20 20 63 61 74 63 68 20 |.. | catch | |00003530| 28 6a 61 76 61 2e 6c 61 | 6e 67 2e 43 6c 61 73 73 |(java.la|ng.Class| |00003540| 4e 6f 74 46 6f 75 6e 64 | 45 78 63 65 70 74 69 6f |NotFound|Exceptio| |00003550| 6e 20 65 29 20 7b 0d 0a | 20 20 20 20 20 20 20 20 |n e) {..| | |00003560| 20 20 2f 2f 20 41 20 63 | 61 6c 6c 20 74 6f 20 43 | // A c|all to C| |00003570| 6c 61 73 73 2e 66 6f 72 | 4e 61 6d 65 28 29 20 66 |lass.for|Name() f| |00003580| 6f 72 63 65 73 20 75 73 | 20 74 6f 20 63 6f 6e 73 |orces us| to cons| |00003590| 69 64 65 72 20 74 68 69 | 73 20 65 78 63 65 70 74 |ider thi|s except| |000035a0| 69 6f 6e 20 3a 2d 29 2e | 2e 2e 0d 0a 20 20 20 20 |ion :-).|.... | |000035b0| 20 20 20 20 20 20 53 79 | 73 74 65 6d 2e 6f 75 74 | Sy|stem.out| |000035c0| 2e 70 72 69 6e 74 6c 6e | 20 28 22 49 6e 74 65 72 |.println| ("Inter| |000035d0| 43 6c 69 65 6e 74 20 6e | 6f 74 20 66 6f 75 6e 64 |Client n|ot found| |000035e0| 20 69 6e 20 63 6c 61 73 | 73 20 70 61 74 68 22 29 | in clas|s path")| |000035f0| 3b 0d 0a 20 20 20 20 20 | 20 20 20 20 20 53 79 73 |;.. | Sys| |00003600| 74 65 6d 2e 6f 75 74 2e | 70 72 69 6e 74 6c 6e 20 |tem.out.|println | |00003610| 28 65 2e 67 65 74 4d 65 | 73 73 61 67 65 20 28 29 |(e.getMe|ssage ()| |00003620| 29 3b 0d 0a 20 20 20 20 | 20 20 20 20 20 20 72 65 |);.. | re| |00003630| 74 75 72 6e 3b 0d 0a 20 | 20 20 20 20 20 20 20 7d |turn;.. | }| |00003640| 0d 0a 20 20 20 20 20 20 | 20 20 62 72 65 61 6b 3b |.. | break;| |00003650| 0d 0a 0d 0a 20 20 20 20 | 20 20 63 61 73 65 20 32 |.... | case 2| |00003660| 3a 0d 0a 20 20 20 20 20 | 20 20 20 2f 2f 20 54 68 |:.. | // Th| |00003670| 65 72 65 20 69 73 20 61 | 20 62 75 67 20 69 6e 20 |ere is a| bug in | |00003680| 73 6f 6d 65 20 4a 44 4b | 20 31 2e 31 20 69 6d 70 |some JDK| 1.1 imp| |00003690| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 73 2c 20 65 67 |lementat|ions, eg| |000036a0| 2e 20 77 69 74 68 20 4d | 69 63 72 6f 73 6f 66 74 |. with M|icrosoft| |000036b0| 0d 0a 20 20 20 20 20 20 | 20 20 2f 2f 20 49 6e 74 |.. | // Int| |000036c0| 65 72 6e 65 74 20 45 78 | 70 6c 6f 72 65 72 2c 20 |ernet Ex|plorer, | |000036d0| 73 75 63 68 20 74 68 61 | 74 20 74 68 65 20 69 6d |such tha|t the im| |000036e0| 70 6c 69 63 69 74 20 64 | 72 69 76 65 72 20 69 6e |plicit d|river in| |000036f0| 73 74 61 6e 63 65 20 63 | 72 65 61 74 65 64 20 64 |stance c|reated d| |00003700| 75 72 69 6e 67 0d 0a 20 | 20 20 20 20 20 20 20 2f |uring.. | /| |00003710| 2f 20 63 6c 61 73 73 20 | 69 6e 69 74 69 61 6c 69 |/ class |initiali| |00003720| 7a 61 74 69 6f 6e 20 64 | 6f 65 73 20 6e 6f 74 20 |zation d|oes not | |00003730| 67 65 74 20 72 65 67 69 | 73 74 65 72 65 64 20 77 |get regi|stered w| |00003740| 68 65 6e 20 74 68 65 20 | 64 72 69 76 65 72 20 69 |hen the |driver i| |00003750| 73 20 6c 6f 61 64 65 64 | 0d 0a 20 20 20 20 20 20 |s loaded|.. | |00003760| 20 20 2f 2f 20 77 69 74 | 68 20 43 6c 61 73 73 2e | // wit|h Class.| |00003770| 66 6f 72 4e 61 6d 65 28 | 29 2e 0d 0a 20 20 20 20 |forName(|)... | |00003780| 20 20 20 20 2f 2f 20 53 | 65 65 20 74 68 65 20 46 | // S|ee the F| |00003790| 41 51 20 61 74 20 68 74 | 74 70 3a 2f 2f 6a 61 76 |AQ at ht|tp://jav| |000037a0| 61 2e 73 75 6e 2e 63 6f | 6d 2f 6a 64 62 63 20 66 |a.sun.co|m/jdbc f| |000037b0| 6f 72 20 6d 6f 72 65 20 | 69 6e 66 6f 20 6f 6e 20 |or more |info on | |000037c0| 74 68 69 73 20 70 72 6f | 62 6c 65 6d 2e 0d 0a 20 |this pro|blem... | |000037d0| 20 20 20 20 20 20 20 2f | 2f 20 4e 6f 74 69 63 65 | /|/ Notice| |000037e0| 20 74 68 61 74 20 69 6e | 20 74 68 65 20 66 6f 6c | that in| the fol| |000037f0| 6c 6f 77 69 6e 67 20 77 | 6f 72 6b 61 72 6f 75 6e |lowing w|orkaroun| |00003800| 64 20 66 6f 72 20 74 68 | 69 73 20 62 75 67 2c 20 |d for th|is bug, | |00003810| 74 68 61 74 20 69 66 20 | 74 68 65 20 62 75 67 0d |that if |the bug.| |00003820| 0a 20 20 20 20 20 20 20 | 20 2f 2f 20 69 73 20 6e |. | // is n| |00003830| 6f 74 20 70 72 65 73 65 | 6e 74 2c 20 74 68 65 6e |ot prese|nt, then| |00003840| 20 74 77 6f 20 69 6e 73 | 74 61 6e 63 65 73 20 6f | two ins|tances o| |00003850| 66 20 74 68 65 20 64 72 | 69 76 65 72 20 77 69 6c |f the dr|iver wil| |00003860| 6c 20 62 65 20 72 65 67 | 69 73 74 65 72 65 64 0d |l be reg|istered.| |00003870| 0a 20 20 20 20 20 20 20 | 20 2f 2f 20 77 69 74 68 |. | // with| |00003880| 20 74 68 65 20 64 72 69 | 76 65 72 20 6d 61 6e 61 | the dri|ver mana| |00003890| 67 65 72 2c 20 74 68 65 | 20 69 6d 70 6c 69 63 69 |ger, the| implici| |000038a0| 74 20 69 6e 73 74 61 6e | 63 65 20 63 72 65 61 74 |t instan|ce creat| |000038b0| 65 64 20 62 79 20 74 68 | 65 20 64 72 69 76 65 72 |ed by th|e driver| |000038c0| 0d 0a 20 20 20 20 20 20 | 20 20 2f 2f 20 63 6c 61 |.. | // cla| |000038d0| 73 73 27 73 20 73 74 61 | 74 69 63 20 63 6c 61 75 |ss's sta|tic clau| |000038e0| 73 65 20 61 6e 64 20 74 | 68 65 20 6f 6e 65 20 63 |se and t|he one c| |000038f0| 72 65 61 74 65 64 20 65 | 78 70 6c 69 63 69 74 6c |reated e|xplicitl| |00003900| 79 20 77 69 74 68 20 6e | 65 77 49 6e 73 74 61 6e |y with n|ewInstan| |00003910| 63 65 28 29 2e 0d 0a 20 | 20 20 20 20 20 20 20 2f |ce()... | /| |00003920| 2f 20 54 68 69 73 20 61 | 6c 74 65 72 6e 61 74 69 |/ This a|lternati| |00003930| 76 65 20 73 68 6f 75 6c | 64 20 6e 6f 74 20 62 65 |ve shoul|d not be| |00003940| 20 75 73 65 64 20 65 78 | 63 65 70 74 20 74 6f 20 | used ex|cept to | |00003950| 77 6f 72 6b 61 72 6f 75 | 6e 64 20 61 20 4a 44 4b |workarou|nd a JDK| |00003960| 20 31 2e 31 0d 0a 20 20 | 20 20 20 20 20 20 2f 2f | 1.1.. | //| |00003970| 20 69 6d 70 6c 65 6d 65 | 6e 74 61 74 69 6f 6e 20 | impleme|ntation | |00003980| 62 75 67 2e 0d 0a 20 20 | 20 20 20 20 20 20 74 72 |bug... | tr| |00003990| 79 20 7b 0d 0a 20 20 20 | 20 20 20 20 20 20 20 6a |y {.. | j| |000039a0| 61 76 61 2e 73 71 6c 2e | 44 72 69 76 65 72 4d 61 |ava.sql.|DriverMa| |000039b0| 6e 61 67 65 72 2e 72 65 | 67 69 73 74 65 72 44 72 |nager.re|gisterDr| |000039c0| 69 76 65 72 20 28 0d 0a | 20 20 20 20 20 20 20 20 |iver (..| | |000039d0| 20 20 20 20 20 28 6a 61 | 76 61 2e 73 71 6c 2e 44 | (ja|va.sql.D| |000039e0| 72 69 76 65 72 29 20 43 | 6c 61 73 73 2e 66 6f 72 |river) C|lass.for| |000039f0| 4e 61 6d 65 20 28 22 69 | 6e 74 65 72 62 61 73 65 |Name ("i|nterbase| |00003a00| 2e 69 6e 74 65 72 63 6c | 69 65 6e 74 2e 44 72 69 |.intercl|ient.Dri| |00003a10| 76 65 72 22 29 2e 6e 65 | 77 49 6e 73 74 61 6e 63 |ver").ne|wInstanc| |00003a20| 65 20 28 29 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |e ().. | | |00003a30| 29 3b 0d 0a 20 20 20 20 | 20 20 20 20 7d 0d 0a 20 |);.. | }.. | |00003a40| 20 20 20 20 20 20 20 63 | 61 74 63 68 20 28 6a 61 | c|atch (ja| |00003a50| 76 61 2e 6c 61 6e 67 2e | 43 6c 61 73 73 4e 6f 74 |va.lang.|ClassNot| |00003a60| 46 6f 75 6e 64 45 78 63 | 65 70 74 69 6f 6e 20 65 |FoundExc|eption e| |00003a70| 29 20 7b 0d 0a 20 20 20 | 20 20 20 20 20 20 20 2f |) {.. | /| |00003a80| 2f 20 41 20 63 61 6c 6c | 20 74 6f 20 43 6c 61 73 |/ A call| to Clas| |00003a90| 73 2e 66 6f 72 4e 61 6d | 65 28 29 20 66 6f 72 63 |s.forNam|e() forc| |00003aa0| 65 73 20 75 73 20 74 6f | 20 63 6f 6e 73 69 64 65 |es us to| conside| |00003ab0| 72 20 74 68 69 73 20 65 | 78 63 65 70 74 69 6f 6e |r this e|xception| |00003ac0| 20 3a 2d 29 2e 2e 2e 0d | 0a 20 20 20 20 20 20 20 | :-)....|. | |00003ad0| 20 20 20 53 79 73 74 65 | 6d 2e 6f 75 74 2e 70 72 | Syste|m.out.pr| |00003ae0| 69 6e 74 6c 6e 20 28 22 | 44 72 69 76 65 72 20 6e |intln ("|Driver n| |00003af0| 6f 74 20 66 6f 75 6e 64 | 20 69 6e 20 63 6c 61 73 |ot found| in clas| |00003b00| 73 20 70 61 74 68 22 29 | 3b 0d 0a 20 20 20 20 20 |s path")|;.. | |00003b10| 20 20 20 20 20 53 79 73 | 74 65 6d 2e 6f 75 74 2e | Sys|tem.out.| |00003b20| 70 72 69 6e 74 6c 6e 20 | 28 65 2e 67 65 74 4d 65 |println |(e.getMe| |00003b30| 73 73 61 67 65 20 28 29 | 29 3b 0d 0a 20 20 20 20 |ssage ()|);.. | |00003b40| 20 20 20 20 20 20 72 65 | 74 75 72 6e 3b 0d 0a 20 | re|turn;.. | |00003b50| 20 20 20 20 20 20 20 7d | 0d 0a 20 20 20 20 20 20 | }|.. | |00003b60| 20 20 63 61 74 63 68 20 | 28 6a 61 76 61 2e 6c 61 | catch |(java.la| |00003b70| 6e 67 2e 49 6c 6c 65 67 | 61 6c 41 63 63 65 73 73 |ng.Illeg|alAccess| |00003b80| 45 78 63 65 70 74 69 6f | 6e 20 65 29 20 7b 0d 0a |Exceptio|n e) {..| |00003b90| 20 20 20 20 20 20 20 20 | 20 20 2f 2f 20 41 20 63 | | // A c| |00003ba0| 61 6c 6c 20 74 6f 20 6e | 65 77 49 6e 73 74 61 6e |all to n|ewInstan| |00003bb0| 63 65 28 29 20 66 6f 72 | 63 65 73 20 75 73 20 74 |ce() for|ces us t| |00003bc0| 6f 20 63 6f 6e 73 69 64 | 65 72 20 74 68 69 73 20 |o consid|er this | |00003bd0| 65 78 63 65 70 74 69 6f | 6e 20 3a 2d 29 2e 2e 2e |exceptio|n :-)...| |00003be0| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 53 79 73 74 |.. | Syst| |00003bf0| 65 6d 2e 6f 75 74 2e 70 | 72 69 6e 74 6c 6e 20 28 |em.out.p|rintln (| |00003c00| 22 55 6e 61 62 6c 65 20 | 74 6f 20 61 63 63 65 73 |"Unable |to acces| |00003c10| 73 20 64 72 69 76 65 72 | 20 63 6f 6e 73 74 72 75 |s driver| constru| |00003c20| 63 74 6f 72 2c 20 74 68 | 69 73 20 73 68 6f 75 6c |ctor, th|is shoul| |00003c30| 64 6e 27 74 20 68 61 70 | 70 65 6e 21 22 29 3b 0d |dn't hap|pen!");.| |00003c40| 0a 20 20 20 20 20 20 20 | 20 20 20 53 79 73 74 65 |. | Syste| |00003c50| 6d 2e 6f 75 74 2e 70 72 | 69 6e 74 6c 6e 20 28 65 |m.out.pr|intln (e| |00003c60| 2e 67 65 74 4d 65 73 73 | 61 67 65 20 28 29 29 3b |.getMess|age ());| |00003c70| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 72 65 74 75 |.. | retu| |00003c80| 72 6e 3b 0d 0a 20 20 20 | 20 20 20 20 20 7d 0d 0a |rn;.. | }..| |00003c90| 20 20 20 20 20 20 20 20 | 63 61 74 63 68 20 28 6a | |catch (j| |00003ca0| 61 76 61 2e 6c 61 6e 67 | 2e 49 6e 73 74 61 6e 74 |ava.lang|.Instant| |00003cb0| 69 61 74 69 6f 6e 45 78 | 63 65 70 74 69 6f 6e 20 |iationEx|ception | |00003cc0| 65 29 20 7b 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |e) {.. | | |00003cd0| 2f 2f 20 41 20 63 61 6c | 6c 20 74 6f 20 6e 65 77 |// A cal|l to new| |00003ce0| 49 6e 73 74 61 6e 63 65 | 28 29 20 66 6f 72 63 65 |Instance|() force| |00003cf0| 73 20 75 73 20 74 6f 20 | 63 6f 6e 73 69 64 65 72 |s us to |consider| |00003d00| 20 74 68 69 73 20 65 78 | 63 65 70 74 69 6f 6e 20 | this ex|ception | |00003d10| 3a 2d 29 2e 2e 2e 0d 0a | 20 20 20 20 20 20 20 20 |:-).....| | |00003d20| 20 20 2f 2f 20 41 74 74 | 65 6d 70 74 20 74 6f 20 | // Att|empt to | |00003d30| 69 6e 73 74 61 6e 74 69 | 61 74 65 20 61 6e 20 69 |instanti|ate an i| |00003d40| 6e 74 65 72 66 61 63 65 | 20 6f 72 20 61 62 73 74 |nterface| or abst| |00003d50| 72 61 63 74 20 63 6c 61 | 73 73 2e 0d 0a 20 20 20 |ract cla|ss... | |00003d60| 20 20 20 20 20 20 20 53 | 79 73 74 65 6d 2e 6f 75 | S|ystem.ou| |00003d70| 74 2e 70 72 69 6e 74 6c | 6e 20 28 22 55 6e 61 62 |t.printl|n ("Unab| |00003d80| 6c 65 20 74 6f 20 63 72 | 65 61 74 65 20 61 6e 20 |le to cr|eate an | |00003d90| 69 6e 73 74 61 6e 63 65 | 20 6f 66 20 64 72 69 76 |instance| of driv| |00003da0| 65 72 20 63 6c 61 73 73 | 2c 20 74 68 69 73 20 73 |er class|, this s| |00003db0| 68 6f 75 6c 64 6e 27 74 | 20 68 61 70 70 65 6e 21 |houldn't| happen!| |00003dc0| 22 29 3b 0d 0a 20 20 20 | 20 20 20 20 20 20 20 53 |");.. | S| |00003dd0| 79 73 74 65 6d 2e 6f 75 | 74 2e 70 72 69 6e 74 6c |ystem.ou|t.printl| |00003de0| 6e 20 28 65 2e 67 65 74 | 4d 65 73 73 61 67 65 20 |n (e.get|Message | |00003df0| 28 29 29 3b 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |());.. | | |00003e00| 72 65 74 75 72 6e 3b 0d | 0a 20 20 20 20 20 20 20 |return;.|. | |00003e10| 20 7d 0d 0a 20 20 20 20 | 20 20 20 20 63 61 74 63 | }.. | catc| |00003e20| 68 20 28 6a 61 76 61 2e | 73 71 6c 2e 53 51 4c 45 |h (java.|sql.SQLE| |00003e30| 78 63 65 70 74 69 6f 6e | 20 65 29 20 7b 0d 0a 20 |xception| e) {.. | |00003e40| 20 20 20 20 20 20 20 20 | 20 2f 2f 20 41 20 63 61 | | // A ca| |00003e50| 6c 6c 20 74 6f 20 72 65 | 67 69 73 74 65 72 44 72 |ll to re|gisterDr| |00003e60| 69 76 65 72 28 29 20 66 | 6f 72 63 65 73 20 75 73 |iver() f|orces us| |00003e70| 20 74 6f 20 63 6f 6e 73 | 69 64 65 72 20 74 68 69 | to cons|ider thi| |00003e80| 73 20 65 78 63 65 70 74 | 69 6f 6e 20 3a 2d 29 2e |s except|ion :-).| |00003e90| 2e 2e 0d 0a 20 20 20 20 | 20 20 20 20 20 20 53 79 |.... | Sy| |00003ea0| 73 74 65 6d 2e 6f 75 74 | 2e 70 72 69 6e 74 6c 6e |stem.out|.println| |00003eb0| 20 28 22 44 72 69 76 65 | 72 20 6d 61 6e 61 67 65 | ("Drive|r manage| |00003ec0| 72 20 66 61 69 6c 65 64 | 20 74 6f 20 72 65 67 69 |r failed| to regi| |00003ed0| 73 74 65 72 20 64 72 69 | 76 65 72 22 29 3b 0d 0a |ster dri|ver");..| |00003ee0| 20 20 20 20 20 20 20 20 | 20 20 73 68 6f 77 53 51 | | showSQ| |00003ef0| 4c 45 78 63 65 70 74 69 | 6f 6e 20 28 65 29 3b 0d |LExcepti|on (e);.| |00003f00| 0a 20 20 20 20 20 20 20 | 20 20 20 72 65 74 75 72 |. | retur| |00003f10| 6e 3b 0d 0a 20 20 20 20 | 20 20 20 20 7d 0d 0a 20 |n;.. | }.. | |00003f20| 20 20 20 20 20 20 20 62 | 72 65 61 6b 3b 0d 0a 0d | b|reak;...| |00003f30| 0a 20 20 20 20 20 20 63 | 61 73 65 20 33 3a 0d 0a |. c|ase 3:..| |00003f40| 20 20 20 20 20 20 20 20 | 2f 2f 20 41 64 64 20 74 | |// Add t| |00003f50| 68 65 20 49 6e 74 65 72 | 43 6c 69 65 6e 74 20 64 |he Inter|Client d| |00003f60| 72 69 76 65 72 20 6e 61 | 6d 65 20 74 6f 20 79 6f |river na|me to yo| |00003f70| 75 72 20 73 79 73 74 65 | 6d 27 73 20 6a 64 62 63 |ur syste|m's jdbc| |00003f80| 2e 64 72 69 76 65 72 73 | 20 70 72 6f 70 65 72 74 |.drivers| propert| |00003f90| 79 20 6c 69 73 74 2e 0d | 0a 20 20 20 20 20 20 20 |y list..|. | |00003fa0| 20 2f 2f 20 54 68 65 20 | 64 72 69 76 65 72 20 6d | // The |driver m| |00003fb0| 61 6e 61 67 65 72 20 77 | 69 6c 6c 20 6c 6f 61 64 |anager w|ill load| |00003fc0| 20 64 72 69 76 65 72 73 | 20 66 72 6f 6d 20 74 68 | drivers| from th| |00003fd0| 69 73 20 73 79 73 74 65 | 6d 20 70 72 6f 70 65 72 |is syste|m proper| |00003fe0| 74 79 20 6c 69 73 74 2e | 0d 0a 20 20 20 20 20 20 |ty list.|.. | |00003ff0| 20 20 2f 2f 20 53 79 73 | 74 65 6d 2e 67 65 74 50 | // Sys|tem.getP| |00004000| 72 6f 70 65 72 74 69 65 | 73 28 29 20 6d 61 79 20 |ropertie|s() may | |00004010| 6e 6f 74 20 62 65 20 61 | 6c 6c 6f 77 65 64 20 66 |not be a|llowed f| |00004020| 6f 72 20 61 70 70 6c 65 | 74 73 20 69 6e 20 73 6f |or apple|ts in so| |00004030| 6d 65 20 62 72 6f 77 73 | 65 72 73 2e 0d 0a 20 20 |me brows|ers... | |00004040| 20 20 20 20 20 20 2f 2f | 20 46 6f 72 20 61 70 70 | //| For app| |00004050| 6c 65 74 73 2c 20 75 73 | 65 20 6f 6e 65 20 6f 66 |lets, us|e one of| |00004060| 20 74 68 65 20 43 6c 61 | 73 73 2e 66 6f 72 4e 61 | the Cla|ss.forNa| |00004070| 6d 65 28 29 20 61 6c 74 | 65 72 6e 61 74 69 76 65 |me() alt|ernative| |00004080| 73 20 61 62 6f 76 65 2e | 0d 0a 20 20 20 20 20 20 |s above.|.. | |00004090| 20 20 6a 61 76 61 2e 75 | 74 69 6c 2e 50 72 6f 70 | java.u|til.Prop| |000040a0| 65 72 74 69 65 73 20 73 | 79 73 50 72 6f 70 73 20 |erties s|ysProps | |000040b0| 3d 20 53 79 73 74 65 6d | 2e 67 65 74 50 72 6f 70 |= System|.getProp| |000040c0| 65 72 74 69 65 73 20 28 | 29 3b 0d 0a 20 20 20 20 |erties (|);.. | |000040d0| 20 20 20 20 53 74 72 69 | 6e 67 42 75 66 66 65 72 | Stri|ngBuffer| |000040e0| 20 64 72 69 76 65 72 73 | 20 3d 20 6e 65 77 20 53 | drivers| = new S| |000040f0| 74 72 69 6e 67 42 75 66 | 66 65 72 20 28 22 69 6e |tringBuf|fer ("in| |00004100| 74 65 72 62 61 73 65 2e | 69 6e 74 65 72 63 6c 69 |terbase.|intercli| |00004110| 65 6e 74 2e 44 72 69 76 | 65 72 22 29 3b 0d 0a 20 |ent.Driv|er");.. | |00004120| 20 20 20 20 20 20 20 53 | 74 72 69 6e 67 20 6f 6c | S|tring ol| |00004130| 64 44 72 69 76 65 72 73 | 20 3d 20 73 79 73 50 72 |dDrivers| = sysPr| |00004140| 6f 70 73 2e 67 65 74 50 | 72 6f 70 65 72 74 79 20 |ops.getP|roperty | |00004150| 28 22 6a 64 62 63 2e 64 | 72 69 76 65 72 73 22 29 |("jdbc.d|rivers")| |00004160| 3b 0d 0a 20 20 20 20 20 | 20 20 20 69 66 20 28 6f |;.. | if (o| |00004170| 6c 64 44 72 69 76 65 72 | 73 20 21 3d 20 6e 75 6c |ldDriver|s != nul| |00004180| 6c 29 0d 0a 20 20 20 20 | 20 20 20 20 20 20 64 72 |l).. | dr| |00004190| 69 76 65 72 73 2e 61 70 | 70 65 6e 64 20 28 22 3a |ivers.ap|pend (":| |000041a0| 22 20 2b 20 6f 6c 64 44 | 72 69 76 65 72 73 29 3b |" + oldD|rivers);| |000041b0| 0d 0a 20 20 20 20 20 20 | 20 20 73 79 73 50 72 6f |.. | sysPro| |000041c0| 70 73 2e 70 75 74 20 28 | 22 6a 64 62 63 2e 64 72 |ps.put (|"jdbc.dr| |000041d0| 69 76 65 72 73 22 2c 20 | 64 72 69 76 65 72 73 2e |ivers", |drivers.| |000041e0| 74 6f 53 74 72 69 6e 67 | 20 28 29 29 3b 0d 0a 20 |toString| ());.. | |000041f0| 20 20 20 20 20 20 20 53 | 79 73 74 65 6d 2e 73 65 | S|ystem.se| |00004200| 74 50 72 6f 70 65 72 74 | 69 65 73 20 28 73 79 73 |tPropert|ies (sys| |00004210| 50 72 6f 70 73 29 3b 0d | 0a 20 20 20 20 20 20 20 |Props);.|. | |00004220| 20 62 72 65 61 6b 3b 0d | 0a 0d 0a 20 20 20 20 20 | break;.|... | |00004230| 20 63 61 73 65 20 34 3a | 0d 0a 20 20 20 20 20 20 | case 4:|.. | |00004240| 20 20 2f 2f 20 41 64 76 | 61 6e 63 65 64 3a 20 54 | // Adv|anced: T| |00004250| 68 69 73 20 69 73 20 61 | 20 6e 6f 6e 2d 73 74 61 |his is a| non-sta| |00004260| 6e 64 61 72 64 20 61 6c | 74 65 72 6e 61 74 69 76 |ndard al|ternativ| |00004270| 65 2c 20 61 6e 64 20 69 | 73 20 74 69 65 64 20 74 |e, and i|s tied t| |00004280| 6f 0d 0a 20 20 20 20 20 | 20 20 20 2f 2f 20 61 20 |o.. | // a | |00004290| 70 61 72 74 69 63 75 6c | 61 72 20 64 72 69 76 65 |particul|ar drive| |000042a0| 72 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |r implem|entation| |000042b0| 2c 20 62 75 74 20 69 73 | 20 76 65 72 79 20 66 6c |, but is| very fl| |000042c0| 65 78 69 62 6c 65 2e 0d | 0a 20 20 20 20 20 20 20 |exible..|. | |000042d0| 20 2f 2f 0d 0a 20 20 20 | 20 20 20 20 20 2f 2f 20 | //.. | // | |000042e0| 49 74 20 6d 61 79 20 62 | 65 20 70 6f 73 73 69 62 |It may b|e possib| |000042f0| 6c 65 20 74 6f 20 63 6f | 6e 66 69 67 75 72 65 20 |le to co|nfigure | |00004300| 61 20 64 72 69 76 65 72 | 20 65 78 70 6c 69 63 69 |a driver| explici| |00004310| 74 6c 79 2c 20 65 69 74 | 68 65 72 20 74 68 72 75 |tly, eit|her thru| |00004320| 0d 0a 20 20 20 20 20 20 | 20 20 2f 2f 20 74 68 65 |.. | // the| |00004330| 20 75 73 65 20 6f 66 20 | 6e 6f 6e 2d 73 74 61 6e | use of |non-stan| |00004340| 64 61 72 64 20 64 72 69 | 76 65 72 20 63 6f 6e 73 |dard dri|ver cons| |00004350| 74 72 75 63 74 6f 72 73 | 2c 20 6f 72 20 6e 6f 6e |tructors|, or non| |00004360| 2d 73 74 61 6e 64 61 72 | 64 0d 0a 20 20 20 20 20 |-standar|d.. | |00004370| 20 20 20 2f 2f 20 64 72 | 69 76 65 72 20 22 73 65 | // dr|iver "se| |00004380| 74 22 20 6d 65 74 68 6f | 64 73 20 77 68 69 63 68 |t" metho|ds which| |00004390| 20 73 6f 6d 65 68 6f 77 | 20 74 61 69 6c 6f 72 20 | somehow| tailor | |000043a0| 74 68 65 20 64 72 69 76 | 65 72 20 74 6f 20 62 65 |the driv|er to be| |000043b0| 68 61 76 65 0d 0a 20 20 | 20 20 20 20 20 20 2f 2f |have.. | //| |000043c0| 20 64 69 66 66 65 72 65 | 6e 74 6c 79 20 66 72 6f | differe|ntly fro| |000043d0| 6d 20 74 68 65 20 64 65 | 66 61 75 6c 74 20 64 72 |m the de|fault dr| |000043e0| 69 76 65 72 20 69 6e 73 | 74 61 6e 63 65 2e 0d 0a |iver ins|tance...| |000043f0| 20 20 20 20 20 20 20 20 | 2f 2f 20 55 6e 64 65 72 | |// Under| |00004400| 20 74 68 69 73 20 61 6c | 74 65 72 6e 61 74 69 76 | this al|ternativ| |00004410| 65 2c 20 61 20 64 72 69 | 76 65 72 20 69 6e 73 74 |e, a dri|ver inst| |00004420| 61 6e 63 65 20 69 73 20 | 63 72 65 61 74 65 64 20 |ance is |created | |00004430| 65 78 70 6c 69 63 69 74 | 6c 79 0d 0a 20 20 20 20 |explicit|ly.. | |00004440| 20 20 20 20 2f 2f 20 75 | 73 69 6e 67 20 61 20 64 | // u|sing a d| |00004450| 72 69 76 65 72 20 73 70 | 65 63 69 66 69 63 20 63 |river sp|ecific c| |00004460| 6f 6e 73 74 72 75 63 74 | 6f 72 2e 20 20 54 68 65 |onstruct|or. The| |00004470| 20 64 72 69 76 65 72 20 | 6d 61 79 20 74 68 65 6e | driver |may then| |00004480| 20 62 65 0d 0a 20 20 20 | 20 20 20 20 20 2f 2f 20 | be.. | // | |00004490| 74 61 69 6c 6f 72 65 64 | 20 64 69 66 66 65 72 65 |tailored| differe| |000044a0| 6e 74 6c 79 20 66 72 6f | 6d 20 74 68 65 20 64 65 |ntly fro|m the de| |000044b0| 66 61 75 6c 74 20 64 72 | 69 76 65 72 20 69 6e 73 |fault dr|iver ins| |000044c0| 74 61 6e 63 65 20 77 68 | 69 63 68 20 69 73 0d 0a |tance wh|ich is..| |000044d0| 20 20 20 20 20 20 20 20 | 2f 2f 20 63 72 65 61 74 | |// creat| |000044e0| 65 64 20 61 75 74 6f 6d | 61 74 69 63 61 6c 6c 79 |ed autom|atically| |000044f0| 20 77 68 65 6e 20 74 68 | 65 20 64 72 69 76 65 72 | when th|e driver| |00004500| 20 63 6c 61 73 73 20 69 | 73 20 6c 6f 61 64 65 64 | class i|s loaded| |00004510| 20 62 79 20 74 68 65 20 | 6a 61 76 61 20 63 6c 61 | by the |java cla| |00004520| 73 73 20 6c 6f 61 64 65 | 72 2e 0d 0a 20 20 20 20 |ss loade|r... | |00004530| 20 20 20 20 2f 2f 20 46 | 6f 72 20 65 78 61 6d 70 | // F|or examp| |00004540| 6c 65 2c 20 70 65 72 68 | 61 70 73 20 61 20 64 72 |le, perh|aps a dr| |00004550| 69 76 65 72 20 69 6e 73 | 74 61 6e 63 65 20 63 6f |iver ins|tance co| |00004560| 75 6c 64 20 62 65 20 63 | 72 65 61 74 65 64 20 77 |uld be c|reated w| |00004570| 68 69 63 68 0d 0a 20 20 | 20 20 20 20 20 20 2f 2f |hich.. | //| |00004580| 20 69 73 20 74 6f 20 62 | 65 68 61 76 65 20 6c 69 | is to b|ehave li| |00004590| 6b 65 20 73 6f 6d 65 20 | 6f 6c 64 65 72 20 76 65 |ke some |older ve| |000045a0| 72 73 69 6f 6e 20 6f 66 | 20 74 68 65 20 64 72 69 |rsion of| the dri| |000045b0| 76 65 72 2e 0d 0a 20 20 | 20 20 20 20 20 20 2f 2f |ver... | //| |000045c0| 0d 0a 20 20 20 20 20 20 | 20 20 2f 2f 20 64 20 3d |.. | // d =| |000045d0| 20 6e 65 77 20 69 6e 74 | 65 72 62 61 73 65 2e 69 | new int|erbase.i| |000045e0| 6e 74 65 72 63 6c 69 65 | 6e 74 2e 44 72 69 76 65 |nterclie|nt.Drive| |000045f0| 72 20 28 29 3b 0d 0a 20 | 20 20 20 20 20 20 20 2f |r ();.. | /| |00004600| 2f 20 64 2e 73 65 74 56 | 65 72 73 69 6f 6e 20 28 |/ d.setV|ersion (| |00004610| 69 6e 74 65 72 62 61 73 | 65 2e 69 6e 74 65 72 63 |interbas|e.interc| |00004620| 6c 69 65 6e 74 2e 44 72 | 69 76 65 72 2e 4f 4c 44 |lient.Dr|iver.OLD| |00004630| 5f 56 45 52 53 49 4f 4e | 29 3b 0d 0a 20 20 20 20 |_VERSION|);.. | |00004640| 20 20 20 20 2f 2f 20 44 | 72 69 76 65 72 4d 61 6e | // D|riverMan| |00004650| 61 67 65 72 2e 72 65 67 | 69 73 74 65 72 44 72 69 |ager.reg|isterDri| |00004660| 76 65 72 20 28 64 29 3b | 0d 0a 20 20 20 20 20 20 |ver (d);|.. | |00004670| 20 20 2f 2f 20 63 20 3d | 20 44 72 69 76 65 72 4d | // c =| DriverM| |00004680| 61 6e 61 67 65 72 2e 67 | 65 74 43 6f 6e 6e 65 63 |anager.g|etConnec| |00004690| 74 69 6f 6e 20 28 2e 2e | 2e 29 3b 0d 0a 20 20 20 |tion (..|.);.. | |000046a0| 20 20 20 20 20 2f 2f 0d | 0a 20 20 20 20 20 20 20 | //.|. | |000046b0| 20 2f 2f 20 53 69 6e 63 | 65 20 74 77 6f 20 64 72 | // Sinc|e two dr| |000046c0| 69 76 65 72 73 2c 20 77 | 69 74 68 20 64 69 66 66 |ivers, w|ith diff| |000046d0| 65 72 69 6e 67 20 62 65 | 68 61 76 69 6f 72 2c 20 |ering be|havior, | |000046e0| 61 72 65 20 6e 6f 77 20 | 72 65 67 69 73 74 65 72 |are now |register| |000046f0| 65 64 20 77 69 74 68 0d | 0a 20 20 20 20 20 20 20 |ed with.|. | |00004700| 20 2f 2f 20 74 68 65 20 | 64 72 69 76 65 72 20 6d | // the |driver m| |00004710| 61 6e 61 67 65 72 2c 20 | 74 68 65 79 20 70 72 65 |anager, |they pre| |00004720| 73 75 6d 61 62 6c 79 20 | 6d 75 73 74 20 72 65 63 |sumably |must rec| |00004730| 6f 67 6e 69 7a 65 20 64 | 69 66 66 65 72 65 6e 74 |ognize d|ifferent| |00004740| 20 6a 64 62 63 0d 0a 20 | 20 20 20 20 20 20 20 2f | jdbc.. | /| |00004750| 2f 20 73 75 62 70 72 6f | 74 6f 63 6f 6c 73 2e 20 |/ subpro|tocols. | |00004760| 20 46 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 74 68 | For exa|mple, th| |00004770| 65 20 74 61 69 6c 6f 72 | 65 64 20 64 72 69 76 65 |e tailor|ed drive| |00004780| 72 20 6d 61 79 20 6f 6e | 6c 79 20 72 65 63 6f 67 |r may on|ly recog| |00004790| 6e 69 7a 65 0d 0a 20 20 | 20 20 20 20 20 20 2f 2f |nize.. | //| |000047a0| 20 22 6a 64 62 63 3a 69 | 6e 74 65 72 62 61 73 65 | "jdbc:i|nterbase| |000047b0| 3a 6f 6c 64 5f 76 65 72 | 73 69 6f 6e 3a 2f 2f 2e |:old_ver|sion://.| |000047c0| 2e 2e 22 2c 20 77 68 65 | 72 65 61 73 20 74 68 65 |..", whe|reas the| |000047d0| 20 64 65 66 61 75 6c 74 | 20 64 72 69 76 65 72 20 | default| driver | |000047e0| 69 6e 73 74 61 6e 63 65 | 0d 0a 20 20 20 20 20 20 |instance|.. | |000047f0| 20 20 2f 2f 20 77 6f 75 | 6c 64 20 72 65 63 6f 67 | // wou|ld recog| |00004800| 6e 69 7a 65 20 74 68 65 | 20 73 74 61 6e 64 61 72 |nize the| standar| |00004810| 64 20 22 6a 64 62 63 3a | 69 6e 74 65 72 62 61 73 |d "jdbc:|interbas| |00004820| 65 3a 2f 2f 2e 2e 2e 22 | 2e 0d 0a 20 20 20 20 20 |e://..."|... | |00004830| 20 20 20 2f 2f 20 54 68 | 65 72 65 20 61 72 65 20 | // Th|ere are | |00004840| 63 75 72 72 65 6e 74 6c | 79 20 6e 6f 20 6d 65 74 |currentl|y no met| |00004850| 68 6f 64 73 2c 20 73 75 | 63 68 20 61 73 20 74 68 |hods, su|ch as th| |00004860| 65 20 68 79 70 6f 74 68 | 65 74 69 63 61 6c 20 73 |e hypoth|etical s| |00004870| 65 74 56 65 72 73 69 6f | 6e 28 29 2c 0d 0a 20 20 |etVersio|n(),.. | |00004880| 20 20 20 20 20 20 2f 2f | 20 66 6f 72 20 74 61 69 | //| for tai| |00004890| 6c 6f 72 69 6e 67 20 61 | 6e 20 49 6e 74 65 72 43 |loring a|n InterC| |000048a0| 6c 69 65 6e 74 20 64 72 | 69 76 65 72 20 73 6f 20 |lient dr|iver so | |000048b0| 74 68 69 73 20 34 74 68 | 20 61 6c 74 65 72 6e 61 |this 4th| alterna| |000048c0| 74 69 76 65 20 69 73 20 | 61 63 61 64 65 6d 69 63 |tive is |academic| |000048d0| 0d 0a 20 20 20 20 20 20 | 20 20 2f 2f 20 61 6e 64 |.. | // and| |000048e0| 20 6e 6f 74 20 6e 65 63 | 65 73 73 61 72 79 20 66 | not nec|essary f| |000048f0| 6f 72 20 49 6e 74 65 72 | 43 6c 69 65 6e 74 2e 0d |or Inter|Client..| |00004900| 0a 20 20 20 20 20 20 20 | 20 2f 2f 0d 0a 20 20 20 |. | //.. | |00004910| 20 20 20 20 20 2f 2f 20 | 49 74 20 69 73 20 61 6c | // |It is al| |00004920| 73 6f 20 70 6f 73 73 69 | 62 6c 65 20 74 6f 20 63 |so possi|ble to c| |00004930| 72 65 61 74 65 20 61 20 | 74 61 69 6c 6f 72 65 64 |reate a |tailored| |00004940| 20 64 72 69 76 65 72 20 | 69 6e 73 74 61 6e 63 65 | driver |instance| |00004950| 20 77 68 69 63 68 0d 0a | 20 20 20 20 20 20 20 20 | which..| | |00004960| 2f 2f 20 69 73 20 2a 6e | 6f 74 2a 20 72 65 67 69 |// is *n|ot* regi| |00004970| 73 74 65 72 65 64 20 77 | 69 74 68 20 74 68 65 20 |stered w|ith the | |00004980| 64 72 69 76 65 72 20 6d | 61 6e 61 67 65 72 20 61 |driver m|anager a| |00004990| 73 20 66 6f 6c 6c 6f 77 | 73 0d 0a 20 20 20 20 20 |s follow|s.. | |000049a0| 20 20 20 2f 2f 0d 0a 20 | 20 20 20 20 20 20 20 2f | //.. | /| |000049b0| 2f 20 64 20 3d 20 6e 65 | 77 20 69 6e 74 65 72 62 |/ d = ne|w interb| |000049c0| 61 73 65 2e 69 6e 74 65 | 72 63 6c 69 65 6e 74 2e |ase.inte|rclient.| |000049d0| 44 72 69 76 65 72 20 28 | 29 3b 0d 0a 20 20 20 20 |Driver (|);.. | |000049e0| 20 20 20 20 2f 2f 20 64 | 2e 73 65 74 56 65 72 73 | // d|.setVers| |000049f0| 69 6f 6e 20 28 69 6e 74 | 65 72 62 61 73 65 2e 69 |ion (int|erbase.i| |00004a00| 6e 74 65 72 63 6c 69 65 | 6e 74 2e 44 72 69 76 65 |nterclie|nt.Drive| |00004a10| 72 2e 4f 4c 44 5f 56 45 | 52 53 49 4f 4e 29 3b 0d |r.OLD_VE|RSION);.| |00004a20| 0a 20 20 20 20 20 20 20 | 20 2f 2f 20 63 20 3d 20 |. | // c = | |00004a30| 64 2e 63 6f 6e 6e 65 63 | 74 20 28 2e 2e 2e 29 3b |d.connec|t (...);| |00004a40| 0d 0a 20 20 20 20 20 20 | 20 20 2f 2f 0d 0a 20 20 |.. | //.. | |00004a50| 20 20 20 20 20 20 2f 2f | 20 74 68 69 73 20 69 73 | //| this is| |00004a60| 20 74 68 65 20 6d 6f 73 | 74 20 75 73 75 61 6c 20 | the mos|t usual | |00004a70| 63 61 73 65 20 61 73 20 | 74 68 69 73 20 64 6f 65 |case as |this doe| |00004a80| 73 20 6e 6f 74 20 72 65 | 71 75 69 72 65 20 64 69 |s not re|quire di| |00004a90| 66 66 65 72 69 6e 67 0d | 0a 20 20 20 20 20 20 20 |ffering.|. | |00004aa0| 20 2f 2f 20 6a 64 62 63 | 20 73 75 62 70 72 6f 74 | // jdbc| subprot| |00004ab0| 6f 63 6f 6c 73 20 73 69 | 6e 63 65 20 74 68 65 20 |ocols si|nce the | |00004ac0| 63 6f 6e 6e 65 63 74 69 | 6f 6e 20 69 73 20 6f 62 |connecti|on is ob| |00004ad0| 74 61 69 6e 65 64 20 74 | 68 72 75 20 74 68 65 20 |tained t|hru the | |00004ae0| 64 72 69 76 65 72 0d 0a | 20 20 20 20 20 20 20 20 |driver..| | |00004af0| 2f 2f 20 64 69 72 65 63 | 74 6c 79 20 72 61 74 68 |// direc|tly rath| |00004b00| 65 72 20 74 68 61 6e 20 | 74 68 72 75 20 74 68 65 |er than |thru the| |00004b10| 20 64 72 69 76 65 72 20 | 6d 61 6e 61 67 65 72 2e | driver |manager.| |00004b20| 0d 0a 20 20 20 20 20 20 | 20 20 64 20 3d 20 6e 65 |.. | d = ne| |00004b30| 77 20 69 6e 74 65 72 62 | 61 73 65 2e 69 6e 74 65 |w interb|ase.inte| |00004b40| 72 63 6c 69 65 6e 74 2e | 44 72 69 76 65 72 20 28 |rclient.|Driver (| |00004b50| 29 3b 0d 0a 20 20 20 20 | 20 20 7d 0d 0a 0d 0a 20 |);.. | }.... | |00004b60| 20 20 20 20 20 2f 2f 20 | 41 74 20 74 68 69 73 20 | // |At this | |00004b70| 70 6f 69 6e 74 20 74 68 | 65 20 64 72 69 76 65 72 |point th|e driver| |00004b80| 20 73 68 6f 75 6c 64 20 | 62 65 20 72 65 67 69 73 | should |be regis| |00004b90| 74 65 72 65 64 20 77 69 | 74 68 20 74 68 65 20 64 |tered wi|th the d| |00004ba0| 72 69 76 65 72 20 6d 61 | 6e 61 67 65 72 2e 0d 0a |river ma|nager...| |00004bb0| 20 20 20 20 20 20 2f 2f | 20 54 72 79 20 74 6f 20 | //| Try to | |00004bc0| 66 69 6e 64 20 74 68 65 | 20 72 65 67 69 73 74 65 |find the| registe| |00004bd0| 72 65 64 20 64 72 69 76 | 65 72 20 74 68 61 74 20 |red driv|er that | |00004be0| 72 65 63 6f 67 6e 69 7a | 65 73 20 69 6e 74 65 72 |recogniz|es inter| |00004bf0| 62 61 73 65 20 55 52 4c | 73 2e 2e 2e 0d 0a 20 20 |base URL|s..... | |00004c00| 20 20 20 20 74 72 79 20 | 7b 0d 0a 20 20 20 20 20 | try |{.. | |00004c10| 20 20 20 2f 2f 20 57 65 | 20 70 61 73 73 20 74 68 | // We| pass th| |00004c20| 65 20 65 6e 74 69 72 65 | 20 64 61 74 61 62 61 73 |e entire| databas| |00004c30| 65 20 55 52 4c 2c 20 62 | 75 74 20 77 65 20 63 6f |e URL, b|ut we co| |00004c40| 75 6c 64 20 6a 75 73 74 | 20 70 61 73 73 20 22 6a |uld just| pass "j| |00004c50| 64 62 63 3a 69 6e 74 65 | 72 62 61 73 65 3a 22 0d |dbc:inte|rbase:".| |00004c60| 0a 20 20 20 20 20 20 20 | 20 64 20 3d 20 6a 61 76 |. | d = jav| |00004c70| 61 2e 73 71 6c 2e 44 72 | 69 76 65 72 4d 61 6e 61 |a.sql.Dr|iverMana| |00004c80| 67 65 72 2e 67 65 74 44 | 72 69 76 65 72 20 28 64 |ger.getD|river (d| |00004c90| 61 74 61 62 61 73 65 55 | 52 4c 29 3b 0d 0a 20 20 |atabaseU|RL);.. | |00004ca0| 20 20 20 20 20 20 53 79 | 73 74 65 6d 2e 6f 75 74 | Sy|stem.out| |00004cb0| 2e 70 72 69 6e 74 6c 6e | 20 28 22 49 6e 74 65 72 |.println| ("Inter| |00004cc0| 43 6c 69 65 6e 74 20 76 | 65 72 73 69 6f 6e 20 22 |Client v|ersion "| |00004cd0| 20 2b 0d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | +.. | | |00004ce0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004cf0| 64 2e 67 65 74 4d 61 6a | 6f 72 56 65 72 73 69 6f |d.getMaj|orVersio| |00004d00| 6e 20 28 29 20 2b 0d 0a | 20 20 20 20 20 20 20 20 |n () +..| | |00004d10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004d20| 20 20 20 20 22 2e 22 20 | 2b 0d 0a 20 20 20 20 20 | "." |+.. | |00004d30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004d40| 20 20 20 20 20 20 20 64 | 2e 67 65 74 4d 69 6e 6f | d|.getMino| |00004d50| 72 56 65 72 73 69 6f 6e | 20 28 29 20 2b 0d 0a 20 |rVersion| () +.. | |00004d60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004d70| 20 20 20 20 20 20 20 20 | 20 20 20 22 20 72 65 67 | | " reg| |00004d80| 69 73 74 65 72 65 64 20 | 77 69 74 68 20 64 72 69 |istered |with dri| |00004d90| 76 65 72 20 6d 61 6e 61 | 67 65 72 2e 22 29 3b 0d |ver mana|ger.");.| |00004da0| 0a 20 20 20 20 20 20 7d | 0d 0a 20 20 20 20 20 20 |. }|.. | |00004db0| 63 61 74 63 68 20 28 6a | 61 76 61 2e 73 71 6c 2e |catch (j|ava.sql.| |00004dc0| 53 51 4c 45 78 63 65 70 | 74 69 6f 6e 20 65 29 20 |SQLExcep|tion e) | |00004dd0| 7b 0d 0a 20 20 20 20 20 | 20 20 20 53 79 73 74 65 |{.. | Syste| |00004de0| 6d 2e 6f 75 74 2e 70 72 | 69 6e 74 6c 6e 20 28 22 |m.out.pr|intln ("| |00004df0| 55 6e 61 62 6c 65 20 74 | 6f 20 66 69 6e 64 20 49 |Unable t|o find I| |00004e00| 6e 74 65 72 43 6c 69 65 | 6e 74 20 61 6d 6f 6e 67 |nterClie|nt among| |00004e10| 20 74 68 65 20 72 65 67 | 69 73 74 65 72 65 64 20 | the reg|istered | |00004e20| 64 72 69 76 65 72 73 2e | 22 29 3b 0d 0a 20 20 20 |drivers.|");.. | |00004e30| 20 20 20 20 20 73 68 6f | 77 53 51 4c 45 78 63 65 | sho|wSQLExce| |00004e40| 70 74 69 6f 6e 20 28 65 | 29 3b 0d 0a 20 20 20 20 |ption (e|);.. | |00004e50| 20 20 20 20 72 65 74 75 | 72 6e 3b 0d 0a 20 20 20 | retu|rn;.. | |00004e60| 20 20 20 7d 0d 0a 0d 0a | 20 20 20 20 20 20 2f 2f | }....| //| |00004e70| 20 41 64 76 61 6e 63 65 | 64 20 69 6e 66 6f 3a 20 | Advance|d info: | |00004e80| 43 6c 61 73 73 2e 66 6f | 72 4e 61 6d 65 28 29 20 |Class.fo|rName() | |00004e90| 6c 6f 61 64 73 20 74 68 | 65 20 6a 61 76 61 20 63 |loads th|e java c| |00004ea0| 6c 61 73 73 20 66 6f 72 | 20 74 68 65 20 64 72 69 |lass for| the dri| |00004eb0| 76 65 72 2e 0d 0a 20 20 | 20 20 20 20 2f 2f 20 41 |ver... | // A| |00004ec0| 6c 6c 20 4a 44 42 43 20 | 64 72 69 76 65 72 73 20 |ll JDBC |drivers | |00004ed0| 61 72 65 20 72 65 71 75 | 69 72 65 64 20 74 6f 20 |are requ|ired to | |00004ee0| 68 61 76 65 20 61 20 73 | 74 61 74 69 63 20 63 6c |have a s|tatic cl| |00004ef0| 61 75 73 65 20 74 68 61 | 74 20 61 75 74 6f 6d 61 |ause tha|t automa| |00004f00| 74 69 63 61 6c 6c 79 0d | 0a 20 20 20 20 20 20 2f |tically.|. /| |00004f10| 2f 20 63 72 65 61 74 65 | 73 20 61 6e 20 69 6e 73 |/ create|s an ins| |00004f20| 74 61 6e 63 65 20 6f 66 | 20 74 68 65 6d 73 65 6c |tance of| themsel| |00004f30| 76 65 73 20 61 6e 64 20 | 72 65 67 69 73 74 65 72 |ves and |register| |00004f40| 73 20 74 68 61 74 20 69 | 6e 73 74 61 6e 63 65 0d |s that i|nstance.| |00004f50| 0a 20 20 20 20 20 20 2f | 2f 20 77 69 74 68 20 74 |. /|/ with t| |00004f60| 68 65 20 64 72 69 76 65 | 72 20 6d 61 6e 61 67 65 |he drive|r manage| |00004f70| 72 2e 20 20 53 6f 20 74 | 68 65 72 65 20 69 73 20 |r. So t|here is | |00004f80| 6e 6f 20 6e 65 65 64 20 | 74 6f 20 63 61 6c 6c 0d |no need |to call.| |00004f90| 0a 20 20 20 20 20 20 2f | 2f 20 44 72 69 76 65 72 |. /|/ Driver| |00004fa0| 4d 61 6e 61 67 65 72 2e | 72 65 67 69 73 74 65 72 |Manager.|register| |00004fb0| 44 72 69 76 65 72 28 29 | 20 65 78 70 6c 69 63 69 |Driver()| explici| |00004fc0| 74 6c 79 20 75 6e 6c 65 | 73 73 20 74 68 65 20 64 |tly unle|ss the d| |00004fd0| 72 69 76 65 72 20 61 6c | 6c 6f 77 73 0d 0a 20 20 |river al|lows.. | |00004fe0| 20 20 20 20 2f 2f 20 66 | 6f 72 20 74 61 69 6c 6f | // f|or tailo| |00004ff0| 72 65 64 20 64 72 69 76 | 65 72 20 69 6e 73 74 61 |red driv|er insta| |00005000| 6e 63 65 73 20 74 6f 20 | 62 65 20 63 72 65 61 74 |nces to |be creat| |00005010| 65 64 20 28 65 61 63 68 | 20 69 6e 73 74 61 6e 63 |ed (each| instanc| |00005020| 65 20 72 65 63 6f 67 6e | 69 7a 69 6e 67 0d 0a 20 |e recogn|izing.. | |00005030| 20 20 20 20 20 2f 2f 20 | 61 20 64 69 66 66 65 72 | // |a differ| |00005040| 65 6e 74 20 6a 64 62 63 | 20 73 75 62 2d 70 72 6f |ent jdbc| sub-pro| |00005050| 74 6f 63 6f 6c 29 2e 0d | 0a 0d 0a 20 20 20 20 20 |tocol)..|... | |00005060| 20 2f 2f 20 4e 6f 77 20 | 74 68 61 74 20 49 6e 74 | // Now |that Int| |00005070| 65 72 43 6c 69 65 6e 74 | 20 69 73 20 72 65 67 69 |erClient| is regi| |00005080| 73 74 65 72 65 64 20 77 | 69 74 68 20 74 68 65 20 |stered w|ith the | |00005090| 64 72 69 76 65 72 20 6d | 61 6e 61 67 65 72 2c 0d |driver m|anager,.| |000050a0| 0a 20 20 20 20 20 20 2f | 2f 20 74 72 79 20 74 6f |. /|/ try to| |000050b0| 20 67 65 74 20 61 20 63 | 6f 6e 6e 65 63 74 69 6f | get a c|onnectio| |000050c0| 6e 20 74 6f 20 61 6e 20 | 65 6d 70 6c 6f 79 65 65 |n to an |employee| |000050d0| 2e 67 64 62 20 64 61 74 | 61 62 61 73 65 20 6f 6e |.gdb dat|abase on| |000050e0| 20 74 68 69 73 20 6c 6f | 63 61 6c 20 6d 61 63 68 | this lo|cal mach| |000050f0| 69 6e 65 0d 0a 20 20 20 | 20 20 20 2f 2f 20 75 73 |ine.. | // us| |00005100| 69 6e 67 20 6f 6e 65 20 | 6f 66 20 74 77 6f 20 61 |ing one |of two a| |00005110| 6c 74 65 72 6e 61 74 69 | 76 65 73 20 66 6f 72 20 |lternati|ves for | |00005120| 6f 62 74 61 69 6e 69 6e | 67 20 63 6f 6e 6e 65 63 |obtainin|g connec| |00005130| 74 69 6f 6e 73 2e 2e 2e | 0d 0a 20 20 20 20 20 20 |tions...|.. | |00005140| 69 6e 74 20 63 6f 6e 6e | 65 63 74 69 6f 6e 41 6c |int conn|ectionAl| |00005150| 74 65 72 6e 61 74 69 76 | 65 20 3d 20 31 3b 0d 0a |ternativ|e = 1;..| |00005160| 20 20 20 20 20 20 73 77 | 69 74 63 68 20 28 63 6f | sw|itch (co| |00005170| 6e 6e 65 63 74 69 6f 6e | 41 6c 74 65 72 6e 61 74 |nnection|Alternat| |00005180| 69 76 65 29 20 7b 0d 0a | 0d 0a 20 20 20 20 20 20 |ive) {..|.. | |00005190| 63 61 73 65 20 31 3a 0d | 0a 20 20 20 20 20 20 20 |case 1:.|. | |000051a0| 20 2f 2f 20 54 68 69 73 | 20 61 6c 74 65 72 6e 61 | // This| alterna| |000051b0| 74 69 76 65 20 69 73 20 | 64 72 69 76 65 72 20 69 |tive is |driver i| |000051c0| 6e 64 65 70 65 6e 64 65 | 6e 74 3b 0d 0a 20 20 20 |ndepende|nt;.. | |000051d0| 20 20 20 20 20 2f 2f 20 | 74 68 65 20 64 72 69 76 | // |the driv| |000051e0| 65 72 20 6d 61 6e 61 67 | 65 72 20 77 69 6c 6c 20 |er manag|er will | |000051f0| 66 69 6e 64 20 74 68 65 | 20 72 69 67 68 74 20 64 |find the| right d| |00005200| 72 69 76 65 72 20 66 6f | 72 20 79 6f 75 20 62 61 |river fo|r you ba| |00005210| 73 65 64 20 6f 6e 20 74 | 68 65 20 6a 64 62 63 20 |sed on t|he jdbc | |00005220| 73 75 62 70 72 6f 74 6f | 63 6f 6c 2e 0d 0a 20 20 |subproto|col... | |00005230| 20 20 20 20 20 20 2f 2f | 20 49 6e 20 74 68 65 20 | //| In the | |00005240| 70 61 73 74 2c 20 74 68 | 69 73 20 61 6c 74 65 72 |past, th|is alter| |00005250| 6e 61 74 69 76 65 20 64 | 69 64 20 6e 6f 74 20 77 |native d|id not w| |00005260| 6f 72 6b 20 77 69 74 68 | 20 61 70 70 6c 65 74 73 |ork with| applets| |00005270| 20 69 6e 20 73 6f 6d 65 | 20 62 72 6f 77 73 65 72 | in some| browser| |00005280| 73 20 62 65 63 61 75 73 | 65 20 6f 66 20 61 0d 0a |s becaus|e of a..| |00005290| 20 20 20 20 20 20 20 20 | 2f 2f 20 62 75 67 20 69 | |// bug i| |000052a0| 6e 20 74 68 65 20 64 72 | 69 76 65 72 20 6d 61 6e |n the dr|iver man| |000052b0| 61 67 65 72 2e 20 20 49 | 20 62 65 6c 69 65 76 65 |ager. I| believe| |000052c0| 20 74 68 69 73 20 68 61 | 73 20 62 65 65 6e 20 66 | this ha|s been f| |000052d0| 69 78 65 64 20 69 6e 20 | 74 68 65 20 6a 64 6b 20 |ixed in |the jdk | |000052e0| 31 2e 31 20 69 6d 70 6c | 65 6d 65 6e 74 61 74 69 |1.1 impl|ementati| |000052f0| 6f 6e 73 2e 0d 0a 20 20 | 20 20 20 20 20 20 74 72 |ons... | tr| |00005300| 79 20 7b 0d 0a 20 20 20 | 20 20 20 20 20 20 20 63 |y {.. | c| |00005310| 20 3d 20 6a 61 76 61 2e | 73 71 6c 2e 44 72 69 76 | = java.|sql.Driv| |00005320| 65 72 4d 61 6e 61 67 65 | 72 2e 67 65 74 43 6f 6e |erManage|r.getCon| |00005330| 6e 65 63 74 69 6f 6e 20 | 28 64 61 74 61 62 61 73 |nection |(databas| |00005340| 65 55 52 4c 2c 20 75 73 | 65 72 2c 20 70 61 73 73 |eURL, us|er, pass| |00005350| 77 6f 72 64 29 3b 0d 0a | 20 20 20 20 20 20 20 20 |word);..| | |00005360| 20 20 53 79 73 74 65 6d | 2e 6f 75 74 2e 70 72 69 | System|.out.pri| |00005370| 6e 74 6c 6e 20 28 22 43 | 6f 6e 6e 65 63 74 69 6f |ntln ("C|onnectio| |00005380| 6e 20 65 73 74 61 62 6c | 69 73 68 65 64 2e 22 29 |n establ|ished.")| |00005390| 3b 0d 0a 20 20 20 20 20 | 20 20 20 7d 0d 0a 20 20 |;.. | }.. | |000053a0| 20 20 20 20 20 20 63 61 | 74 63 68 20 28 6a 61 76 | ca|tch (jav| |000053b0| 61 2e 73 71 6c 2e 53 51 | 4c 45 78 63 65 70 74 69 |a.sql.SQ|LExcepti| |000053c0| 6f 6e 20 65 29 20 7b 0d | 0a 20 20 20 20 20 20 20 |on e) {.|. | |000053d0| 20 20 20 53 79 73 74 65 | 6d 2e 6f 75 74 2e 70 72 | Syste|m.out.pr| |000053e0| 69 6e 74 6c 6e 20 28 22 | 55 6e 61 62 6c 65 20 74 |intln ("|Unable t| |000053f0| 6f 20 65 73 74 61 62 6c | 69 73 68 20 61 20 63 6f |o establ|ish a co| |00005400| 6e 6e 65 63 74 69 6f 6e | 20 74 68 72 6f 75 67 68 |nnection| through| |00005410| 20 74 68 65 20 64 72 69 | 76 65 72 20 6d 61 6e 61 | the dri|ver mana| |00005420| 67 65 72 2e 22 29 3b 0d | 0a 20 20 20 20 20 20 20 |ger.");.|. | |00005430| 20 20 20 73 68 6f 77 53 | 51 4c 45 78 63 65 70 74 | showS|QLExcept| |00005440| 69 6f 6e 20 28 65 29 3b | 0d 0a 20 20 20 20 20 20 |ion (e);|.. | |00005450| 20 20 20 20 72 65 74 75 | 72 6e 3b 0d 0a 20 20 20 | retu|rn;.. | |00005460| 20 20 20 20 20 7d 0d 0a | 20 20 20 20 20 20 20 20 | }..| | |00005470| 62 72 65 61 6b 3b 0d 0a | 20 20 20 20 20 20 20 20 |break;..| | |00005480| 0d 0a 20 20 20 20 20 20 | 63 61 73 65 20 32 3a 0d |.. |case 2:.| |00005490| 0a 20 20 20 20 20 20 20 | 20 2f 2f 20 49 66 20 79 |. | // If y| |000054a0| 6f 75 27 72 65 20 77 6f | 72 6b 69 6e 67 20 77 69 |ou're wo|rking wi| |000054b0| 74 68 20 61 20 70 61 72 | 74 69 63 75 6c 61 72 20 |th a par|ticular | |000054c0| 64 72 69 76 65 72 20 64 | 2c 20 77 68 69 63 68 20 |driver d|, which | |000054d0| 6d 61 79 20 6f 72 20 6d | 61 79 20 6e 6f 74 20 62 |may or m|ay not b| |000054e0| 65 20 72 65 67 69 73 74 | 65 72 65 64 2c 0d 0a 20 |e regist|ered,.. | |000054f0| 20 20 20 20 20 20 20 2f | 2f 20 79 6f 75 20 63 61 | /|/ you ca| |00005500| 6e 20 67 65 74 20 61 20 | 63 6f 6e 6e 65 63 74 69 |n get a |connecti| |00005510| 6f 6e 20 64 69 72 65 63 | 74 6c 79 20 66 72 6f 6d |on direc|tly from| |00005520| 20 69 74 2c 20 62 79 70 | 61 73 73 69 6e 67 20 74 | it, byp|assing t| |00005530| 68 65 20 64 72 69 76 65 | 72 20 6d 61 6e 61 67 65 |he drive|r manage| |00005540| 72 2e 2e 2e 0d 0a 20 20 | 20 20 20 20 20 20 74 72 |r..... | tr| |00005550| 79 20 7b 0d 0a 20 20 20 | 20 20 20 20 20 20 20 6a |y {.. | j| |00005560| 61 76 61 2e 75 74 69 6c | 2e 50 72 6f 70 65 72 74 |ava.util|.Propert| |00005570| 69 65 73 20 63 6f 6e 6e | 65 63 74 69 6f 6e 50 72 |ies conn|ectionPr| |00005580| 6f 70 65 72 74 69 65 73 | 20 3d 20 6e 65 77 20 6a |operties| = new j| |00005590| 61 76 61 2e 75 74 69 6c | 2e 50 72 6f 70 65 72 74 |ava.util|.Propert| |000055a0| 69 65 73 20 28 29 3b 0d | 0a 20 20 20 20 20 20 20 |ies ();.|. | |000055b0| 20 20 20 63 6f 6e 6e 65 | 63 74 69 6f 6e 50 72 6f | conne|ctionPro| |000055c0| 70 65 72 74 69 65 73 2e | 70 75 74 20 28 22 75 73 |perties.|put ("us| |000055d0| 65 72 22 2c 20 75 73 65 | 72 29 3b 0d 0a 20 20 20 |er", use|r);.. | |000055e0| 20 20 20 20 20 20 20 63 | 6f 6e 6e 65 63 74 69 6f | c|onnectio| |000055f0| 6e 50 72 6f 70 65 72 74 | 69 65 73 2e 70 75 74 20 |nPropert|ies.put | |00005600| 28 22 70 61 73 73 77 6f | 72 64 22 2c 20 70 61 73 |("passwo|rd", pas| |00005610| 73 77 6f 72 64 29 3b 0d | 0a 20 20 20 20 20 20 20 |sword);.|. | |00005620| 20 20 20 63 20 3d 20 64 | 2e 63 6f 6e 6e 65 63 74 | c = d|.connect| |00005630| 20 28 64 61 74 61 62 61 | 73 65 55 52 4c 2c 20 63 | (databa|seURL, c| |00005640| 6f 6e 6e 65 63 74 69 6f | 6e 50 72 6f 70 65 72 74 |onnectio|nPropert| |00005650| 69 65 73 29 3b 0d 0a 20 | 20 20 20 20 20 20 20 20 |ies);.. | | |00005660| 20 53 79 73 74 65 6d 2e | 6f 75 74 2e 70 72 69 6e | System.|out.prin| |00005670| 74 6c 6e 20 28 22 43 6f | 6e 6e 65 63 74 69 6f 6e |tln ("Co|nnection| |00005680| 20 65 73 74 61 62 6c 69 | 73 68 65 64 2e 22 29 3b | establi|shed.");| |00005690| 0d 0a 20 20 20 20 20 20 | 20 20 7d 0d 0a 20 20 20 |.. | }.. | |000056a0| 20 20 20 20 20 63 61 74 | 63 68 20 28 6a 61 76 61 | cat|ch (java| |000056b0| 2e 73 71 6c 2e 53 51 4c | 45 78 63 65 70 74 69 6f |.sql.SQL|Exceptio| |000056c0| 6e 20 65 29 20 7b 0d 0a | 20 20 20 20 20 20 20 20 |n e) {..| | |000056d0| 20 20 53 79 73 74 65 6d | 2e 6f 75 74 2e 70 72 69 | System|.out.pri| |000056e0| 6e 74 6c 6e 20 28 22 55 | 6e 61 62 6c 65 20 74 6f |ntln ("U|nable to| |000056f0| 20 65 73 74 61 62 6c 69 | 73 68 20 61 20 63 6f 6e | establi|sh a con| |00005700| 6e 65 63 74 69 6f 6e 20 | 74 68 72 6f 75 67 68 20 |nection |through | |00005710| 74 68 65 20 64 72 69 76 | 65 72 2e 22 29 3b 0d 0a |the driv|er.");..| |00005720| 20 20 20 20 20 20 20 20 | 20 20 73 68 6f 77 53 51 | | showSQ| |00005730| 4c 45 78 63 65 70 74 69 | 6f 6e 20 28 65 29 3b 0d |LExcepti|on (e);.| |00005740| 0a 20 20 20 20 20 20 20 | 20 20 20 72 65 74 75 72 |. | retur| |00005750| 6e 3b 0d 0a 20 20 20 20 | 20 20 20 20 7d 0d 0a 20 |n;.. | }.. | |00005760| 20 20 20 20 20 20 20 62 | 72 65 61 6b 3b 0d 0a 20 | b|reak;.. | |00005770| 20 20 20 20 20 7d 0d 0a | 0d 0a 20 20 20 20 20 20 | }..|.. | |00005780| 2f 2f 20 4c 65 74 27 73 | 20 64 69 73 61 62 6c 65 |// Let's| disable| |00005790| 20 74 68 65 20 64 65 66 | 61 75 6c 74 20 61 75 74 | the def|ault aut| |000057a0| 6f 63 6f 6d 6d 69 74 20 | 73 6f 20 77 65 20 63 61 |ocommit |so we ca| |000057b0| 6e 20 75 6e 64 6f 20 6f | 75 72 20 63 68 61 6e 67 |n undo o|ur chang| |000057c0| 65 73 20 6c 61 74 65 72 | 2e 2e 2e 0d 0a 20 20 20 |es later|..... | |000057d0| 20 20 20 74 72 79 20 7b | 0d 0a 20 20 20 20 20 20 | try {|.. | |000057e0| 20 20 63 2e 73 65 74 41 | 75 74 6f 43 6f 6d 6d 69 | c.setA|utoCommi| |000057f0| 74 20 28 66 61 6c 73 65 | 29 3b 0d 0a 20 20 20 20 |t (false|);.. | |00005800| 20 20 20 20 53 79 73 74 | 65 6d 2e 6f 75 74 2e 70 | Syst|em.out.p| |00005810| 72 69 6e 74 6c 6e 20 28 | 22 41 75 74 6f 2d 63 6f |rintln (|"Auto-co| |00005820| 6d 6d 69 74 20 69 73 20 | 64 69 73 61 62 6c 65 64 |mmit is |disabled| |00005830| 2e 22 29 3b 0d 0a 20 20 | 20 20 20 20 7d 0d 0a 20 |.");.. | }.. | |00005840| 20 20 20 20 20 63 61 74 | 63 68 20 28 6a 61 76 61 | cat|ch (java| |00005850| 2e 73 71 6c 2e 53 51 4c | 45 78 63 65 70 74 69 6f |.sql.SQL|Exceptio| |00005860| 6e 20 65 29 20 7b 0d 0a | 20 20 20 20 20 20 20 20 |n e) {..| | |00005870| 53 79 73 74 65 6d 2e 6f | 75 74 2e 70 72 69 6e 74 |System.o|ut.print| |00005880| 6c 6e 20 28 22 55 6e 61 | 62 6c 65 20 74 6f 20 64 |ln ("Una|ble to d| |00005890| 69 73 61 62 6c 65 20 61 | 75 74 6f 63 6f 6d 6d 69 |isable a|utocommi| |000058a0| 74 2e 22 29 3b 0d 0a 20 | 20 20 20 20 20 20 20 73 |t.");.. | s| |000058b0| 68 6f 77 53 51 4c 45 78 | 63 65 70 74 69 6f 6e 20 |howSQLEx|ception | |000058c0| 28 65 29 3b 0d 0a 20 20 | 20 20 20 20 20 20 72 65 |(e);.. | re| |000058d0| 74 75 72 6e 3b 0d 0a 20 | 20 20 20 20 20 7d 0d 0a |turn;.. | }..| |000058e0| 0d 0a 20 20 20 20 20 20 | 2f 2f 20 4e 6f 77 20 74 |.. |// Now t| |000058f0| 68 61 74 20 77 65 20 68 | 61 76 65 20 61 20 63 6f |hat we h|ave a co| |00005900| 6e 6e 65 63 74 69 6f 6e | 2c 20 6c 65 74 27 73 20 |nnection|, let's | |00005910| 74 72 79 20 74 6f 20 67 | 65 74 20 73 6f 6d 65 20 |try to g|et some | |00005920| 6d 65 74 61 20 64 61 74 | 61 2e 2e 2e 0d 0a 20 20 |meta dat|a..... | |00005930| 20 20 20 20 74 72 79 20 | 7b 0d 0a 20 20 20 20 20 | try |{.. | |00005940| 20 20 20 6a 61 76 61 2e | 73 71 6c 2e 44 61 74 61 | java.|sql.Data| |00005950| 62 61 73 65 4d 65 74 61 | 44 61 74 61 20 64 62 4d |baseMeta|Data dbM| |00005960| 65 74 61 44 61 74 61 20 | 3d 20 63 2e 67 65 74 4d |etaData |= c.getM| |00005970| 65 74 61 44 61 74 61 20 | 28 29 3b 0d 0a 20 20 20 |etaData |();.. | |00005980| 20 20 20 20 0d 0a 20 20 | 20 20 20 20 20 20 2f 2f | .. | //| |00005990| 20 4f 6b 2c 20 6c 65 74 | 27 73 20 71 75 65 72 79 | Ok, let|'s query| |000059a0| 20 61 20 64 72 69 76 65 | 72 2f 64 61 74 61 62 61 | a drive|r/databa| |000059b0| 73 65 20 63 61 70 61 62 | 69 6c 69 74 79 0d 0a 20 |se capab|ility.. | |000059c0| 20 20 20 20 20 20 20 69 | 66 20 28 64 62 4d 65 74 | i|f (dbMet| |000059d0| 61 44 61 74 61 2e 73 75 | 70 70 6f 72 74 73 54 72 |aData.su|pportsTr| |000059e0| 61 6e 73 61 63 74 69 6f | 6e 73 20 28 29 29 0d 0a |ansactio|ns ())..| |000059f0| 20 20 20 20 20 20 20 20 | 20 20 53 79 73 74 65 6d | | System| |00005a00| 2e 6f 75 74 2e 70 72 69 | 6e 74 6c 6e 20 28 22 54 |.out.pri|ntln ("T| |00005a10| 72 61 6e 73 61 63 74 69 | 6f 6e 73 20 61 72 65 20 |ransacti|ons are | |00005a20| 73 75 70 70 6f 72 74 65 | 64 2e 22 29 3b 0d 0a 20 |supporte|d.");.. | |00005a30| 20 20 20 20 20 20 20 65 | 6c 73 65 0d 0a 20 20 20 | e|lse.. | |00005a40| 20 20 20 20 20 20 20 53 | 79 73 74 65 6d 2e 6f 75 | S|ystem.ou| |00005a50| 74 2e 70 72 69 6e 74 6c | 6e 20 28 22 54 72 61 6e |t.printl|n ("Tran| |00005a60| 73 61 63 74 69 6f 6e 73 | 20 61 72 65 20 6e 6f 74 |sactions| are not| |00005a70| 20 73 75 70 70 6f 72 74 | 65 64 2e 22 29 3b 0d 0a | support|ed.");..| |00005a80| 0d 0a 20 20 20 20 20 20 | 20 20 2f 2f 20 57 68 61 |.. | // Wha| |00005a90| 74 20 61 72 65 20 74 68 | 65 20 76 69 65 77 73 20 |t are th|e views | |00005aa0| 64 65 66 69 6e 65 64 20 | 6f 6e 20 74 68 69 73 20 |defined |on this | |00005ab0| 64 61 74 61 62 61 73 65 | 3f 0d 0a 20 20 20 20 20 |database|?.. | |00005ac0| 20 20 20 6a 61 76 61 2e | 73 71 6c 2e 52 65 73 75 | java.|sql.Resu| |00005ad0| 6c 74 53 65 74 20 74 61 | 62 6c 65 73 20 3d 20 64 |ltSet ta|bles = d| |00005ae0| 62 4d 65 74 61 44 61 74 | 61 2e 67 65 74 54 61 62 |bMetaDat|a.getTab| |00005af0| 6c 65 73 20 28 6e 75 6c | 6c 2c 20 6e 75 6c 6c 2c |les (nul|l, null,| |00005b00| 20 22 25 22 2c 20 6e 65 | 77 20 53 74 72 69 6e 67 | "%", ne|w String| |00005b10| 5b 5d 20 7b 22 56 49 45 | 57 22 7d 29 3b 0d 0a 20 |[] {"VIE|W"});.. | |00005b20| 20 20 20 20 20 20 20 77 | 68 69 6c 65 20 28 74 61 | w|hile (ta| |00005b30| 62 6c 65 73 2e 6e 65 78 | 74 20 28 29 29 20 7b 0d |bles.nex|t ()) {.| |00005b40| 0a 20 20 20 20 20 20 20 | 20 20 20 53 79 73 74 65 |. | Syste| |00005b50| 6d 2e 6f 75 74 2e 70 72 | 69 6e 74 6c 6e 20 28 74 |m.out.pr|intln (t| |00005b60| 61 62 6c 65 73 2e 67 65 | 74 53 74 72 69 6e 67 20 |ables.ge|tString | |00005b70| 28 22 54 41 42 4c 45 5f | 4e 41 4d 45 22 29 20 2b |("TABLE_|NAME") +| |00005b80| 20 22 20 69 73 20 61 20 | 76 69 65 77 2e 22 29 3b | " is a |view.");| |00005b90| 0d 0a 20 20 20 20 20 20 | 20 20 7d 0d 0a 20 20 20 |.. | }.. | |00005ba0| 20 20 20 20 20 74 61 62 | 6c 65 73 2e 63 6c 6f 73 | tab|les.clos| |00005bb0| 65 20 28 29 3b 0d 0a 20 | 20 20 20 20 20 7d 0d 0a |e ();.. | }..| |00005bc0| 20 20 20 20 20 20 63 61 | 74 63 68 20 28 6a 61 76 | ca|tch (jav| |00005bd0| 61 2e 73 71 6c 2e 53 51 | 4c 45 78 63 65 70 74 69 |a.sql.SQ|LExcepti| |00005be0| 6f 6e 20 65 29 20 7b 0d | 0a 20 20 20 20 20 20 20 |on e) {.|. | |00005bf0| 20 53 79 73 74 65 6d 2e | 6f 75 74 2e 70 72 69 6e | System.|out.prin| |00005c00| 74 6c 6e 20 28 22 55 6e | 61 62 6c 65 20 74 6f 20 |tln ("Un|able to | |00005c10| 65 78 74 72 61 63 74 20 | 64 61 74 61 62 61 73 65 |extract |database| |00005c20| 20 6d 65 74 61 20 64 61 | 74 61 2e 22 29 3b 0d 0a | meta da|ta.");..| |00005c30| 20 20 20 20 20 20 20 20 | 73 68 6f 77 53 51 4c 45 | |showSQLE| |00005c40| 78 63 65 70 74 69 6f 6e | 20 28 65 29 3b 0d 0a 20 |xception| (e);.. | |00005c50| 20 20 20 20 20 20 20 2f | 2f 20 57 68 61 74 20 74 | /|/ What t| |00005c60| 68 65 20 68 65 63 6b 2c | 20 77 68 6f 20 6e 65 65 |he heck,| who nee| |00005c70| 64 73 20 6d 65 74 61 20 | 64 61 74 61 20 61 6e 79 |ds meta |data any| |00005c80| 77 61 79 20 3b 2d 28 2c | 20 6c 65 74 27 73 20 63 |way ;-(,| let's c| |00005c90| 6f 6e 74 69 6e 75 65 20 | 6f 6e 2e 2e 2e 0d 0a 20 |ontinue |on..... | |00005ca0| 20 20 20 20 20 7d 0d 0a | 0d 0a 20 20 20 20 20 20 | }..|.. | |00005cb0| 2f 2f 20 4c 65 74 27 73 | 20 74 72 79 20 74 6f 20 |// Let's| try to | |00005cc0| 73 75 62 6d 69 74 20 73 | 6f 6d 65 20 73 74 61 74 |submit s|ome stat| |00005cd0| 69 63 20 53 51 4c 20 6f | 6e 20 74 68 65 20 63 6f |ic SQL o|n the co| |00005ce0| 6e 6e 65 63 74 69 6f 6e | 2e 0d 0a 20 20 20 20 20 |nnection|... | |00005cf0| 20 2f 2f 20 4e 6f 74 65 | 3a 20 54 68 69 73 20 53 | // Note|: This S| |00005d00| 51 4c 20 73 68 6f 75 6c | 64 20 74 68 72 6f 77 20 |QL shoul|d throw | |00005d10| 61 6e 20 65 78 63 65 70 | 74 69 6f 6e 20 6f 6e 20 |an excep|tion on | |00005d20| 65 6d 70 6c 6f 79 65 65 | 2e 67 64 62 20 62 65 63 |employee|.gdb bec| |00005d30| 61 75 73 65 0d 0a 20 20 | 20 20 20 20 2f 2f 20 20 |ause.. | // | |00005d40| 20 20 20 20 20 6f 66 20 | 61 6e 20 69 6e 74 65 67 | of |an integ| |00005d50| 72 69 74 79 20 63 6f 6e | 73 74 72 61 69 6e 74 20 |rity con|straint | |00005d60| 76 69 6f 6c 61 74 69 6f | 6e 2e 20 20 0d 0a 20 20 |violatio|n. .. | |00005d70| 20 20 20 20 74 72 79 20 | 7b 0d 0a 20 20 20 20 20 | try |{.. | |00005d80| 20 20 20 73 20 3d 20 63 | 2e 63 72 65 61 74 65 53 | s = c|.createS| |00005d90| 74 61 74 65 6d 65 6e 74 | 20 28 29 3b 0d 0a 20 20 |tatement| ();.. | |00005da0| 20 20 20 20 20 20 73 2e | 65 78 65 63 75 74 65 55 | s.|executeU| |00005db0| 70 64 61 74 65 20 28 22 | 75 70 64 61 74 65 20 65 |pdate ("|update e| |00005dc0| 6d 70 6c 6f 79 65 65 20 | 73 65 74 20 73 61 6c 61 |mployee |set sala| |00005dd0| 72 79 20 3d 20 73 61 6c | 61 72 79 20 2b 20 31 30 |ry = sal|ary + 10| |00005de0| 30 30 30 22 29 3b 0d 0a | 20 20 20 20 20 20 7d 0d |000");..| }.| |00005df0| 0a 20 20 20 20 20 20 63 | 61 74 63 68 20 28 6a 61 |. c|atch (ja| |00005e00| 76 61 2e 73 71 6c 2e 53 | 51 4c 45 78 63 65 70 74 |va.sql.S|QLExcept| |00005e10| 69 6f 6e 20 65 29 20 7b | 0d 0a 20 20 20 20 20 20 |ion e) {|.. | |00005e20| 20 20 53 79 73 74 65 6d | 2e 6f 75 74 2e 70 72 69 | System|.out.pri| |00005e30| 6e 74 6c 6e 20 28 22 55 | 6e 61 62 6c 65 20 74 6f |ntln ("U|nable to| |00005e40| 20 69 6e 63 72 65 61 73 | 65 20 65 76 65 72 79 6f | increas|e everyo| |00005e50| 6e 65 27 73 20 73 61 6c | 61 72 79 2e 22 29 3b 0d |ne's sal|ary.");.| |00005e60| 0a 20 20 20 20 20 20 20 | 20 73 68 6f 77 53 51 4c |. | showSQL| |00005e70| 45 78 63 65 70 74 69 6f | 6e 20 28 65 29 3b 0d 0a |Exceptio|n (e);..| |00005e80| 20 20 20 20 20 20 20 20 | 2f 2f 20 57 65 20 65 78 | |// We ex| |00005e90| 70 65 63 74 65 64 20 74 | 68 69 73 20 74 6f 20 66 |pected t|his to f| |00005ea0| 61 69 6c 2c 20 73 6f 20 | 64 6f 6e 27 74 20 72 65 |ail, so |don't re| |00005eb0| 74 75 72 6e 2c 20 6c 65 | 74 27 73 20 6b 65 65 70 |turn, le|t's keep| |00005ec0| 20 67 6f 69 6e 67 2e 2e | 2e 0d 0a 20 20 20 20 20 | going..|... | |00005ed0| 20 7d 0d 0a 0d 0a 20 20 | 20 20 20 20 2f 2f 20 4c | }.... | // L| |00005ee0| 65 74 27 73 20 73 75 62 | 6d 69 74 20 73 6f 6d 65 |et's sub|mit some| |00005ef0| 20 73 74 61 74 69 63 20 | 53 51 4c 20 77 68 69 63 | static |SQL whic| |00005f00| 68 20 70 72 6f 64 75 63 | 65 73 20 61 20 72 65 73 |h produc|es a res| |00005f10| 75 6c 74 20 73 65 74 2e | 0d 0a 20 20 20 20 20 20 |ult set.|.. | |00005f20| 2f 2f 20 4e 6f 74 69 63 | 65 20 74 68 61 74 20 74 |// Notic|e that t| |00005f30| 68 65 20 73 74 61 74 65 | 6d 65 6e 74 20 73 20 69 |he state|ment s i| |00005f40| 73 20 72 65 75 73 65 64 | 20 77 69 74 68 20 61 20 |s reused| with a | |00005f50| 6e 65 77 20 53 51 4c 20 | 73 74 72 69 6e 67 2e 0d |new SQL |string..| |00005f60| 0a 20 20 20 20 20 20 74 | 72 79 20 7b 0d 0a 20 20 |. t|ry {.. | |00005f70| 20 20 20 20 20 20 72 73 | 20 3d 20 73 2e 65 78 65 | rs| = s.exe| |00005f80| 63 75 74 65 51 75 65 72 | 79 20 28 22 73 65 6c 65 |cuteQuer|y ("sele| |00005f90| 63 74 20 66 75 6c 6c 5f | 6e 61 6d 65 20 66 72 6f |ct full_|name fro| |00005fa0| 6d 20 65 6d 70 6c 6f 79 | 65 65 20 77 68 65 72 65 |m employ|ee where| |00005fb0| 20 73 61 6c 61 72 79 20 | 3c 20 35 30 30 30 30 22 | salary |< 50000"| |00005fc0| 29 3b 0d 0a 20 20 20 20 | 20 20 7d 0d 0a 20 20 20 |);.. | }.. | |00005fd0| 20 20 20 63 61 74 63 68 | 20 28 6a 61 76 61 2e 73 | catch| (java.s| |00005fe0| 71 6c 2e 53 51 4c 45 78 | 63 65 70 74 69 6f 6e 20 |ql.SQLEx|ception | |00005ff0| 65 29 20 7b 0d 0a 20 20 | 20 20 20 20 20 20 53 79 |e) {.. | Sy| |00006000| 73 74 65 6d 2e 6f 75 74 | 2e 70 72 69 6e 74 6c 6e |stem.out|.println| |00006010| 20 28 22 55 6e 61 62 6c | 65 20 74 6f 20 73 75 62 | ("Unabl|e to sub| |00006020| 6d 69 74 20 61 20 73 74 | 61 74 69 63 20 53 51 4c |mit a st|atic SQL| |00006030| 20 71 75 65 72 79 2e 22 | 29 3b 0d 0a 20 20 20 20 | query."|);.. | |00006040| 20 20 20 20 73 68 6f 77 | 53 51 4c 45 78 63 65 70 | show|SQLExcep| |00006050| 74 69 6f 6e 20 28 65 29 | 3b 0d 0a 20 20 20 20 20 |tion (e)|;.. | |00006060| 20 20 20 2f 2f 20 57 65 | 20 63 61 6e 27 74 20 67 | // We| can't g| |00006070| 6f 20 6d 75 63 68 20 66 | 75 72 74 68 65 72 20 77 |o much f|urther w| |00006080| 69 74 68 6f 75 74 20 61 | 20 72 65 73 75 6c 74 20 |ithout a| result | |00006090| 73 65 74 2c 20 72 65 74 | 75 72 6e 2e 2e 2e 0d 0a |set, ret|urn.....| |000060a0| 20 20 20 20 20 20 20 20 | 72 65 74 75 72 6e 3b 0d | |return;.| |000060b0| 0a 20 20 20 20 20 20 7d | 0d 0a 0d 0a 20 20 20 20 |. }|.... | |000060c0| 20 20 2f 2f 20 54 68 65 | 20 71 75 65 72 79 20 61 | // The| query a| |000060d0| 62 6f 76 65 20 63 6f 75 | 6c 64 20 6a 75 73 74 20 |bove cou|ld just | |000060e0| 61 73 20 65 61 73 69 6c | 79 20 68 61 76 65 20 62 |as easil|y have b| |000060f0| 65 65 6e 20 64 79 6e 61 | 6d 69 63 20 53 51 4c 2c |een dyna|mic SQL,| |00006100| 0d 0a 20 20 20 20 20 20 | 2f 2f 20 65 67 2e 20 69 |.. |// eg. i| |00006110| 66 20 74 68 65 20 53 51 | 4c 20 68 61 64 20 62 65 |f the SQ|L had be| |00006120| 65 6e 20 65 6e 74 65 72 | 65 64 20 61 73 20 75 73 |en enter|ed as us| |00006130| 65 72 20 69 6e 70 75 74 | 2e 0d 0a 20 20 20 20 20 |er input|... | |00006140| 20 2f 2f 20 41 73 20 61 | 20 64 79 6e 61 6d 69 63 | // As a| dynamic| |00006150| 20 71 75 65 72 79 2c 20 | 77 65 27 64 20 6e 65 65 | query, |we'd nee| |00006160| 64 20 74 6f 20 71 75 65 | 72 79 20 74 68 65 20 72 |d to que|ry the r| |00006170| 65 73 75 6c 74 20 73 65 | 74 20 6d 65 74 61 20 64 |esult se|t meta d| |00006180| 61 74 61 0d 0a 20 20 20 | 20 20 20 2f 2f 20 66 6f |ata.. | // fo| |00006190| 72 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 61 62 |r inform|ation ab| |000061a0| 6f 75 74 20 74 68 65 20 | 72 65 73 75 6c 74 20 73 |out the |result s| |000061b0| 65 74 27 73 20 63 6f 6c | 75 6d 6e 73 2e 0d 0a 20 |et's col|umns... | |000061c0| 20 20 20 20 20 74 72 79 | 20 7b 0d 0a 20 20 20 20 | try| {.. | |000061d0| 20 20 20 20 6a 61 76 61 | 2e 73 71 6c 2e 52 65 73 | java|.sql.Res| |000061e0| 75 6c 74 53 65 74 4d 65 | 74 61 44 61 74 61 20 72 |ultSetMe|taData r| |000061f0| 73 4d 65 74 61 44 61 74 | 61 20 3d 20 72 73 2e 67 |sMetaDat|a = rs.g| |00006200| 65 74 4d 65 74 61 44 61 | 74 61 20 28 29 3b 0d 0a |etMetaDa|ta ();..| |00006210| 20 20 20 20 20 20 20 20 | 53 79 73 74 65 6d 2e 6f | |System.o| |00006220| 75 74 2e 70 72 69 6e 74 | 6c 6e 20 28 22 54 68 65 |ut.print|ln ("The| |00006230| 20 71 75 65 72 79 20 65 | 78 65 63 75 74 65 64 20 | query e|xecuted | |00006240| 68 61 73 20 22 20 2b 0d | 0a 20 20 20 20 20 20 20 |has " +.|. | |00006250| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00006260| 20 20 20 20 20 72 73 4d | 65 74 61 44 61 74 61 2e | rsM|etaData.| |00006270| 67 65 74 43 6f 6c 75 6d | 6e 43 6f 75 6e 74 20 28 |getColum|nCount (| |00006280| 29 20 2b 0d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |) +.. | | |00006290| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000062a0| 20 22 20 72 65 73 75 6c | 74 20 63 6f 6c 75 6d 6e | " resul|t column| |000062b0| 73 2e 22 29 3b 0d 0a 20 | 20 20 20 20 20 20 20 53 |s.");.. | S| |000062c0| 79 73 74 65 6d 2e 6f 75 | 74 2e 70 72 69 6e 74 6c |ystem.ou|t.printl| |000062d0| 6e 20 28 22 48 65 72 65 | 20 61 72 65 20 74 68 65 |n ("Here| are the| |000062e0| 20 63 6f 6c 75 6d 6e 73 | 3a 20 22 29 3b 0d 0a 20 | columns|: ");.. | |000062f0| 20 20 20 20 20 20 20 66 | 6f 72 20 28 69 6e 74 20 | f|or (int | |00006300| 69 20 3d 20 31 3b 20 69 | 20 3c 3d 20 72 73 4d 65 |i = 1; i| <= rsMe| |00006310| 74 61 44 61 74 61 2e 67 | 65 74 43 6f 6c 75 6d 6e |taData.g|etColumn| |00006320| 43 6f 75 6e 74 20 28 29 | 3b 20 69 2b 2b 29 20 7b |Count ()|; i++) {| |00006330| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 53 79 73 74 |.. | Syst| |00006340| 65 6d 2e 6f 75 74 2e 70 | 72 69 6e 74 6c 6e 20 28 |em.out.p|rintln (| |00006350| 72 73 4d 65 74 61 44 61 | 74 61 2e 67 65 74 43 6f |rsMetaDa|ta.getCo| |00006360| 6c 75 6d 6e 4e 61 6d 65 | 20 28 69 29 20 2b 0d 0a |lumnName| (i) +..| |00006370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00006380| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 22 20 | | " | |00006390| 6f 66 20 74 79 70 65 20 | 22 20 2b 0d 0a 20 20 20 |of type |" +.. | |000063a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000063b0| 20 20 20 20 20 20 20 20 | 20 20 20 72 73 4d 65 74 | | rsMet| |000063c0| 61 44 61 74 61 2e 67 65 | 74 43 6f 6c 75 6d 6e 54 |aData.ge|tColumnT| |000063d0| 79 70 65 4e 61 6d 65 20 | 28 69 29 29 3b 0d 0a 20 |ypeName |(i));.. | |000063e0| 20 20 20 20 20 20 20 7d | 0d 0a 20 20 20 20 20 20 | }|.. | |000063f0| 7d 0d 0a 20 20 20 20 20 | 20 63 61 74 63 68 20 28 |}.. | catch (| +--------+-------------------------+-------------------------+--------+--------+ Only 25.0 KB of data is shown above.