home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Java / ScriptBuilder / NOSB30_TRIAL.exe / data1.cab / Program_Files / scriptlib3.sbl / ROOT39 / DATA
Unknown  |  1998-10-05  |  2.4 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% file SIMH tape data default (weak)
99% file data default
100% TrID LTAC compressed audio (v1.61) default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 10 00 00 00 47 65 74 4c | 61 73 74 50 72 6f 6a 65 |....GetL|astProje|
|00000010| 63 74 49 44 10 00 00 00 | 47 65 74 4c 61 73 74 50 |ctID....|GetLastP|
|00000020| 72 6f 6a 65 63 74 49 44 | 08 00 00 00 4c 69 76 65 |rojectID|....Live|
|00000030| 57 69 72 65 12 00 00 00 | 47 65 74 20 4c 61 73 74 |Wire....|Get Last|
|00000040| 20 50 72 6f 6a 65 63 74 | 49 44 fe 08 00 00 2f 2a | Project|ID..../*|
|00000050| 20 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d | =======|========|
|00000060| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000070| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000080| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000090| 3d 3d 3d 3d 3d 3d 3d 0d | 0a 46 55 4e 43 54 49 4f |=======.|.FUNCTIO|
|000000a0| 4e 3a 09 47 65 74 4c 61 | 73 74 50 72 6f 6a 65 63 |N:.GetLa|stProjec|
|000000b0| 74 49 44 20 0d 0a 20 0d | 0a 49 4e 50 55 54 3a 20 |tID .. .|.INPUT: |
|000000c0| 09 09 63 6f 6e 6e 65 63 | 74 69 6f 6e 20 28 6f 62 |..connec|tion (ob|
|000000d0| 6a 65 63 74 29 09 09 3a | 20 61 20 4c 69 76 65 57 |ject)..:| a LiveW|
|000000e0| 69 72 65 20 64 61 74 61 | 62 61 73 65 20 6f 72 20 |ire data|base or |
|000000f0| 63 6f 6e 6e 65 63 74 69 | 6f 6e 20 6f 62 6a 65 63 |connecti|on objec|
|00000100| 74 0d 0a 09 09 09 09 64 | 62 54 61 62 6c 65 20 28 |t......d|bTable (|
|00000110| 73 74 72 69 6e 67 29 09 | 09 09 3a 20 74 68 65 20 |string).|..: the |
|00000120| 6e 61 6d 65 20 6f 66 20 | 61 20 64 61 74 61 62 61 |name of |a databa|
|00000130| 73 65 20 74 61 62 6c 65 | 0d 0a 09 09 09 09 64 62 |se table|......db|
|00000140| 46 69 65 6c 64 4e 61 6d | 65 20 28 73 74 72 69 6e |FieldNam|e (strin|
|00000150| 67 29 09 09 3a 20 74 68 | 65 20 6e 61 6d 65 20 6f |g)..: th|e name o|
|00000160| 66 20 74 68 65 20 66 69 | 65 6c 64 20 63 6f 6e 74 |f the fi|eld cont|
|00000170| 61 69 6e 69 6e 67 20 74 | 68 65 20 49 44 27 73 0d |aining t|he ID's.|
|00000180| 0a 0d 0a 52 45 54 55 52 | 4e 53 3a 09 09 54 68 65 |...RETUR|NS:..The|
|00000190| 20 68 69 67 68 65 73 74 | 20 75 6e 69 71 75 65 20 | highest| unique |
|000001a0| 69 64 65 6e 74 69 66 69 | 65 72 20 66 6f 72 20 61 |identifi|er for a|
|000001b0| 20 72 65 63 6f 72 64 20 | 69 6e 20 64 62 54 61 62 | record |in dbTab|
|000001c0| 6c 65 3b 0d 0a 09 09 09 | 09 30 20 69 66 20 74 68 |le;.....|.0 if th|
|000001d0| 65 20 74 61 62 6c 65 20 | 69 73 20 65 6d 70 74 79 |e table |is empty|
|000001e0| 20 20 0d 0a 0d 0a 44 45 | 53 43 3a 09 09 09 54 68 | ....DE|SC:...Th|
|000001f0| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 72 65 74 75 |is funct|ion retu|
|00000200| 72 6e 73 20 74 68 65 20 | 68 69 67 68 65 73 74 20 |rns the |highest |
|00000210| 75 6e 69 71 75 65 20 69 | 64 65 6e 74 69 66 69 65 |unique i|dentifie|
|00000220| 72 2c 20 64 62 46 69 65 | 6c 64 2c 20 66 6f 72 0d |r, dbFie|ld, for.|
|00000230| 0a 09 09 09 09 61 6c 6c | 20 72 65 63 6f 72 64 73 |.....all| records|
|00000240| 20 69 6e 20 64 62 54 61 | 62 6c 65 2e 20 20 49 74 | in dbTa|ble. It|
|00000250| 20 73 65 74 73 20 74 68 | 65 20 76 61 6c 75 65 20 | sets th|e value |
|00000260| 6f 66 20 70 72 6f 6a 65 | 63 74 2e 6c 61 73 74 49 |of proje|ct.lastI|
|00000270| 44 20 65 71 75 61 6c 20 | 74 6f 0d 0a 09 09 09 09 |D equal |to......|
|00000280| 74 68 69 73 20 76 61 6c | 75 65 2e 20 20 54 68 69 |this val|ue. Thi|
|00000290| 73 20 66 75 6e 63 74 69 | 6f 6e 20 69 73 20 6f 6e |s functi|on is on|
|000002a0| 6c 79 20 75 73 65 66 75 | 6c 20 69 66 20 64 62 46 |ly usefu|l if dbF|
|000002b0| 69 65 6c 64 20 69 73 20 | 74 68 65 20 75 6e 69 71 |ield is |the uniq|
|000002c0| 75 65 0d 0a 09 09 09 09 | 69 64 65 6e 74 69 66 69 |ue......|identifi|
|000002d0| 65 72 20 6f 66 20 74 68 | 65 20 74 61 62 6c 65 20 |er of th|e table |
|000002e0| 61 6e 64 20 68 6f 6c 64 | 73 20 69 6e 74 65 67 65 |and hold|s intege|
|000002f0| 72 20 76 61 6c 75 65 73 | 2e 20 20 59 6f 75 20 73 |r values|. You s|
|00000300| 68 6f 75 6c 64 20 6f 6e | 6c 79 0d 0a 09 09 09 09 |hould on|ly......|
|00000310| 75 73 65 20 74 68 69 73 | 20 74 6f 20 69 6e 69 74 |use this| to init|
|00000320| 69 61 6c 69 7a 65 20 74 | 68 65 20 70 72 6f 6a 65 |ialize t|he proje|
|00000330| 63 74 2e 6c 61 73 74 49 | 44 20 66 69 65 6c 64 2c |ct.lastI|D field,|
|00000340| 20 73 75 63 68 20 61 73 | 20 69 6e 20 74 68 65 0d | such as| in the.|
|00000350| 0a 09 09 09 09 61 70 70 | 6c 69 63 61 74 69 6f 6e |.....app|lication|
|00000360| 27 73 20 69 6e 69 74 69 | 61 6c 20 70 61 67 65 2e |'s initi|al page.|
|00000370| 20 20 0d 0a 09 09 09 09 | 0d 0a 50 4c 41 54 46 4f | ......|..PLATFO|
|00000380| 52 4d 53 3a 09 4e 65 74 | 73 63 61 70 65 20 45 6e |RMS:.Net|scape En|
|00000390| 74 65 72 70 72 69 73 65 | 20 53 65 72 76 65 72 20 |terprise| Server |
|000003a0| 33 2e 30 0d 0a 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |3.0..===|========|
|000003b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000003c0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000003d0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000003e0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 20 2a 2f 0d 0a |========|=== */..|
|000003f0| 66 75 6e 63 74 69 6f 6e | 20 47 65 74 4c 61 73 74 |function| GetLast|
|00000400| 50 72 6f 6a 65 63 74 49 | 44 20 28 20 63 6f 6e 6e |ProjectI|D ( conn|
|00000410| 65 63 74 69 6f 6e 2c 20 | 64 62 54 61 62 6c 65 2c |ection, |dbTable,|
|00000420| 20 64 62 46 69 65 6c 64 | 4e 61 6d 65 20 29 20 7b | dbField|Name ) {|
|00000430| 0d 0a 09 2f 2f 20 56 61 | 6c 69 64 61 74 65 20 70 |...// Va|lidate p|
|00000440| 61 72 61 6d 65 74 65 72 | 73 20 76 61 6c 75 65 73 |arameter|s values|
|00000450| 0d 0a 09 69 66 20 28 74 | 79 70 65 6f 66 28 63 6f |...if (t|ypeof(co|
|00000460| 6e 6e 65 63 74 69 6f 6e | 29 20 3d 3d 20 74 79 70 |nnection|) == typ|
|00000470| 65 6f 66 28 76 6f 69 64 | 28 30 29 29 20 7c 7c 20 |eof(void|(0)) || |
|00000480| 63 6f 6e 6e 65 63 74 69 | 6f 6e 20 3d 3d 20 6e 75 |connecti|on == nu|
|00000490| 6c 6c 29 0d 0a 09 09 72 | 65 74 75 72 6e 20 6e 75 |ll)....r|eturn nu|
|000004a0| 6c 6c 3b 0d 0a 09 69 66 | 20 28 74 79 70 65 6f 66 |ll;...if| (typeof|
|000004b0| 28 64 62 54 61 62 6c 65 | 29 20 3d 3d 20 74 79 70 |(dbTable|) == typ|
|000004c0| 65 6f 66 28 76 6f 69 64 | 28 30 29 29 20 7c 7c 20 |eof(void|(0)) || |
|000004d0| 64 62 54 61 62 6c 65 20 | 3d 3d 20 6e 75 6c 6c 29 |dbTable |== null)|
|000004e0| 0d 0a 09 09 72 65 74 75 | 72 6e 20 6e 75 6c 6c 3b |....retu|rn null;|
|000004f0| 0d 0a 09 69 66 20 28 74 | 79 70 65 6f 66 28 64 62 |...if (t|ypeof(db|
|00000500| 46 69 65 6c 64 4e 61 6d | 65 29 20 3d 3d 20 74 79 |FieldNam|e) == ty|
|00000510| 70 65 6f 66 28 76 6f 69 | 64 28 30 29 29 20 7c 7c |peof(voi|d(0)) |||
|00000520| 20 64 62 46 69 65 6c 64 | 4e 61 6d 65 20 3d 3d 20 | dbField|Name == |
|00000530| 6e 75 6c 6c 29 20 0d 0a | 09 09 72 65 74 75 72 6e |null) ..|..return|
|00000540| 20 6e 75 6c 6c 3b 0d 0a | 09 69 66 20 28 21 63 6f | null;..|.if (!co|
|00000550| 6e 6e 65 63 74 69 6f 6e | 2e 63 6f 6e 6e 65 63 74 |nnection|.connect|
|00000560| 65 64 28 29 29 20 7b 0d | 0a 09 09 77 72 69 74 65 |ed()) {.|...write|
|00000570| 28 22 45 72 72 6f 72 3a | 20 4e 6f 20 63 6f 6e 6e |("Error:| No conn|
|00000580| 65 63 74 69 6f 6e 20 74 | 6f 20 64 61 74 61 62 61 |ection t|o databa|
|00000590| 73 65 2e 22 29 3b 20 0d | 0a 09 09 72 65 74 75 72 |se."); .|...retur|
|000005a0| 6e 20 6e 75 6c 6c 3b 0d | 0a 09 7d 0d 0a 09 65 6c |n null;.|..}...el|
|000005b0| 73 65 20 7b 0d 0a 0d 0a | 09 09 2f 2f 20 4c 6f 63 |se {....|..// Loc|
|000005c0| 6b 20 74 68 65 20 70 72 | 6f 6a 65 63 74 20 6f 62 |k the pr|oject ob|
|000005d0| 6a 65 63 74 20 74 6f 20 | 70 72 65 76 65 6e 74 20 |ject to |prevent |
|000005e0| 63 6f 6e 63 75 72 72 65 | 6e 74 20 61 63 63 65 73 |concurre|nt acces|
|000005f0| 73 0d 0a 09 09 70 72 6f | 6a 65 63 74 2e 6c 6f 63 |s....pro|ject.loc|
|00000600| 6b 28 29 3b 20 0d 0a 09 | 09 09 2f 2f 20 49 6e 69 |k(); ...|..// Ini|
|00000610| 74 69 61 6c 69 7a 65 20 | 74 68 65 20 6c 61 73 74 |tialize |the last|
|00000620| 49 44 20 61 72 72 61 79 | 20 69 66 20 69 74 20 64 |ID array| if it d|
|00000630| 6f 65 73 6e 27 74 20 65 | 78 69 73 74 0d 0a 09 09 |oesn't e|xist....|
|00000640| 09 69 66 20 28 70 72 6f | 6a 65 63 74 2e 6c 61 73 |.if (pro|ject.las|
|00000650| 74 49 44 20 3d 3d 20 76 | 6f 69 64 28 30 29 20 7c |tID == v|oid(0) ||
|00000660| 7c 20 70 72 6f 6a 65 63 | 74 2e 6c 61 73 74 49 44 || projec|t.lastID|
|00000670| 20 3d 3d 20 6e 75 6c 6c | 20 7c 7c 20 70 72 6f 6a | == null| || proj|
|00000680| 65 63 74 2e 6c 61 73 74 | 49 44 20 3d 3d 20 22 22 |ect.last|ID == ""|
|00000690| 29 0d 0a 09 09 09 09 70 | 72 6f 6a 65 63 74 2e 6c |)......p|roject.l|
|000006a0| 61 73 74 49 44 20 3d 20 | 6e 65 77 20 41 72 72 61 |astID = |new Arra|
|000006b0| 79 28 29 3b 0d 0a 09 09 | 09 09 0d 0a 09 09 09 2f |y();....|......./|
|000006c0| 2f 20 47 65 74 20 74 68 | 65 20 6d 61 78 69 6d 75 |/ Get th|e maximu|
|000006d0| 6d 20 76 61 6c 75 65 20 | 66 6f 72 20 74 68 65 20 |m value |for the |
|000006e0| 75 6e 69 71 75 65 20 49 | 44 20 66 69 65 6c 64 2c |unique I|D field,|
|000006f0| 20 64 62 46 69 65 6c 64 | 2c 20 69 6e 20 64 62 54 | dbField|, in dbT|
|00000700| 61 62 6c 65 0d 0a 09 09 | 09 63 75 72 73 6f 72 20 |able....|.cursor |
|00000710| 3d 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 2e 63 75 72 |= connec|tion.cur|
|00000720| 73 6f 72 28 22 73 65 6c | 65 63 74 20 4d 41 58 28 |sor("sel|ect MAX(|
|00000730| 22 20 2b 20 64 62 46 69 | 65 6c 64 4e 61 6d 65 20 |" + dbFi|eldName |
|00000740| 2b 20 22 29 20 66 72 6f | 6d 20 22 20 2b 20 64 62 |+ ") fro|m " + db|
|00000750| 54 61 62 6c 65 29 3b 0d | 0a 09 09 09 0d 0a 09 09 |Table);.|........|
|00000760| 09 2f 2f 20 53 74 6f 72 | 65 20 74 68 65 20 6c 61 |.// Stor|e the la|
|00000770| 73 74 2c 20 6d 61 78 20 | 49 44 20 66 6f 72 20 64 |st, max |ID for d|
|00000780| 62 54 61 62 6c 65 20 69 | 6e 20 61 6e 20 61 73 73 |bTable i|n an ass|
|00000790| 6f 63 69 61 74 69 76 65 | 20 61 72 72 61 79 20 63 |ociative| array c|
|000007a0| 6f 6e 74 61 69 6e 69 6e | 67 20 61 6c 6c 20 6c 61 |ontainin|g all la|
|000007b0| 73 74 49 44 27 73 0d 0a | 09 09 09 2f 2f 20 66 6f |stID's..|...// fo|
|000007c0| 72 20 61 6e 79 20 6e 75 | 6d 62 65 72 20 6f 66 20 |r any nu|mber of |
|000007d0| 74 61 62 6c 65 73 20 74 | 72 61 63 6b 65 64 20 69 |tables t|racked i|
|000007e0| 6e 20 74 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |n the ap|plicatio|
|000007f0| 6e 2e 20 20 54 68 65 20 | 61 72 72 61 79 20 69 73 |n. The |array is|
|00000800| 20 69 6e 64 65 78 65 64 | 20 62 79 20 74 68 65 0d | indexed| by the.|
|00000810| 0a 09 09 09 2f 2f 20 6e | 61 6d 65 20 6f 66 20 74 |....// n|ame of t|
|00000820| 68 65 20 74 61 62 6c 65 | 20 68 65 6c 64 20 69 6e |he table| held in|
|00000830| 20 74 68 65 20 64 62 54 | 61 62 6c 65 20 70 61 72 | the dbT|able par|
|00000840| 61 6d 65 74 65 72 2e 0d | 0a 09 09 09 69 66 20 28 |ameter..|....if (|
|00000850| 63 75 72 73 6f 72 2e 6e | 65 78 74 28 29 29 20 0d |cursor.n|ext()) .|
|00000860| 0a 09 09 09 09 69 66 20 | 28 63 75 72 73 6f 72 5b |.....if |(cursor[|
|00000870| 30 5d 20 21 3d 20 6e 75 | 6c 6c 29 0d 0a 09 09 09 |0] != nu|ll).....|
|00000880| 09 09 70 72 6f 6a 65 63 | 74 2e 6c 61 73 74 49 44 |..projec|t.lastID|
|00000890| 5b 64 62 54 61 62 6c 65 | 5d 20 3d 20 63 75 72 73 |[dbTable|] = curs|
|000008a0| 6f 72 5b 30 5d 3b 0d 0a | 09 09 09 09 65 6c 73 65 |or[0];..|....else|
|000008b0| 0d 0a 09 09 09 09 09 70 | 72 6f 6a 65 63 74 2e 6c |.......p|roject.l|
|000008c0| 61 73 74 49 44 5b 64 62 | 54 61 62 6c 65 5d 20 3d |astID[db|Table] =|
|000008d0| 20 30 3b 09 09 09 09 09 | 0d 0a 09 20 20 09 09 63 | 0;.....|... ..c|
|000008e0| 75 72 73 6f 72 2e 63 6c | 6f 73 65 28 29 3b 0d 0a |ursor.cl|ose();..|
|000008f0| 09 09 70 72 6f 6a 65 63 | 74 2e 75 6e 6c 6f 63 6b |..projec|t.unlock|
|00000900| 28 29 3b 20 0d 0a 09 7d | 0d 0a 20 20 0d 0a 20 09 |(); ...}|.. .. .|
|00000910| 72 65 74 75 72 6e 20 70 | 72 6f 6a 65 63 74 2e 6c |return p|roject.l|
|00000920| 61 73 74 49 44 5b 64 62 | 54 61 62 6c 65 5d 3b 0d |astID[db|Table];.|
|00000930| 0a 7d 20 2f 2f 20 65 6e | 64 20 47 65 74 4c 61 73 |.} // en|d GetLas|
|00000940| 74 50 72 6f 6a 65 63 74 | 49 44 0d 0a 0e 00 00 00 |tProject|ID......|
|00000950| 33 2e 30 20 61 6e 64 20 | 68 69 67 68 65 72 0e 00 |3.0 and |higher..|
|00000960| 00 00 33 2e 30 20 61 6e | 64 20 68 69 67 68 65 72 |..3.0 an|d higher|
+--------+-------------------------+-------------------------+--------+--------+