Okay, I'm new to asp. It's been a nightmare getting my redhat 6.0 httpsd
server to even process this stuff. Anyway, I finally got some action. So
after my demo stuff worked for the most part, I tried this guestbook I
generated in Drumbeat 2000...I'm lost.

1. loaded  http://admin.biojazz.com/dbeat/gbook/Index.asp
2. clicked on "add entry"

got what's below

The server error_log says (this is followed by the page
output...arrggghhhhhhhhhhhhhhhhh!)

--------------------------------------------------------------------------

[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] STARTING ASP
HANDLER (v0.09) for file
/users/admin/public_html/dbeat/gbook/ViewEntrySummaries.asp
[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] GlobalASA
package
Apache::ASP::Compiles::_users_admin_public_html_dbeat_gbook___global_asa

[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] created
$Application -
[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] SessionCookie -
b8724d9dacf210ccfec9940681e5a3bd
[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] new session
state Apache::ASP::State=HASH(0x8219850)
[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] session timed
out, clearing
[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] Session_OnEnd -
session: b8724d9dacf210ccfec9940681e5a3bd;
[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] tieing session -

[Fri Feb  4 02:21:36 2000] [error] [asp] [debug] [3841] forcing groups
cleanup
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] group check
GroupIdb8
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] skipping delete
self - id: b8724d9dacf210ccfec9940681e5a3bd;
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] cleanup groups -
deleted: 0;
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841]
Application_OnEnd
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841]
Application_OnStart
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] Session_OnStart
- session: b8724d9dacf210ccfec9940681e5a3bd;
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] ASP object
created - Application: Apache::ASP::Application=HASH(0x832ff98);
GlobalASA: Apache::ASP::GlobalASA=HASH(0x8334184); Internal:
Apache::ASP::State=HASH(0x831e574); Request:
Apache::ASP::Request=HASH(0x8314164); Response:
Apache::ASP::Response=HASH(0x8314218); Server:
Apache::ASP::Server=HASH(0x831e4c0); Session:
Apache::ASP::Session=HASH(0x831e5f8); app_start: 0; basename:
ViewEntrySummaries.asp; buffering_on: 1; cgi_do_self: 0; command_line: ;
compile_error: ; compile_includes: ; cookie_path: /; debug: 2;
debugs_output: ARRAY(0x8314398); dirname:
/users/admin/public_html/dbeat/gbook; errors: 0; errors_output:
ARRAY(0x831e52c); filehandle: ; filename:
/users/admin/public_html/dbeat/gbook/ViewEntrySummaries.asp; filter: 0;
global: /users/admin/public_html/dbeat/gbook/.; group_refresh: 3;
groups_refresh: 3; id:
_users_admin_public_html_dbeat_gbook_ViewEntrySummaries_asp____INLINE;
mtime: 948361945; no_cache: ; no_headers: 0; no_session: 0; no_state: ;
pod_comments: 1; r: Apache=SCALAR(0x831408c); remote_ip: 208.32.76.146;
secure_session: ; session_serialize: ; session_timeout: 30;
soft_redirect: ; stat_inc: ; state_db: SDBM_File; state_dir: ./.state;
state_manager: 10;
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] compiling -
package:
_users_admin_public_html_dbeat_gbook_ViewEntrySummaries_asp____INLINE;
[Fri Feb  4 02:21:37 2000] [error] [asp] [error] /* Connection Pooler
*/: ?+*{} follows nothing in regexp at (eval 41) line 1660. <--> ,
/usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 818
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] building cgi
headers
[Fri Feb  4 02:21:37 2000] [error] [asp] [debug] [3841] sending cgi
headers
[Fri Feb  4 02:21:38 2000] [error] [asp] [debug] [3841] destroying -
asp: Apache::ASP=HASH(0x8334478);


----------------------------------------------------------------------------------------

...as the page displays this

Thanks for any hints (and if I ever get jre to work so netscape doesn't
crash each time I hit a j enabled page...well...that's WAY off this
topic isn't it ;-)

-----------------------------------------------------------------------------------------

Errors Output

/* Connection Pooler */: ?+*{} follows nothing in regexp at (eval 204)
line 1660.
, /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 818

Debug Output

STARTING ASP HANDLER (v0.09) for file
/users/admin/public_html/dbeat/gbook/ViewEntrySummaries.asp
GlobalASA package
Apache::ASP::Compiles::_users_admin_public_html_dbeat_gbook___global_asa

compiling - package: _users_admin_public_html_dbeat_gbook___global_asa;
global.asa routines -
created $Application -
SessionCookie - b8724d9dacf210ccfec9940681e5a3bd
new session state Apache::ASP::State=HASH(0x8157c7c)
session timed out, clearing
Session_OnEnd - session: b8724d9dacf210ccfec9940681e5a3bd;
tieing session -
forcing groups cleanup
group check GroupIdb8
skipping delete self - id: b8724d9dacf210ccfec9940681e5a3bd;
cleanup groups - deleted: 0;
Application_OnEnd
Application_OnStart
Session_OnStart - session: b8724d9dacf210ccfec9940681e5a3bd;
ASP object created - Application:
Apache::ASP::Application=HASH(0x8408c74); GlobalASA:
Apache::ASP::GlobalASA=HASH(0x8414220); Internal:
Apache::ASP::State=HASH(0x83edf18); Request:
Apache::ASP::Request=HASH(0x8405ed0); Response:
Apache::ASP::Response=HASH(0x8414130); Server:
Apache::ASP::Server=HASH(0x831f8c8); Session:
Apache::ASP::Session=HASH(0x835aa90); app_start: 0; basename:
ViewEntrySummaries.asp; buffering_on: 1; cgi_do_self: 0; command_line: ;
compile_error: ; compile_includes: ; cookie_path: /; debug: 2;
debugs_output: ARRAY(0x8404ba0); dirname:
/users/admin/public_html/dbeat/gbook; errors: 0; errors_output:
ARRAY(0x8404a5c); filehandle: ; filename:
/users/admin/public_html/dbeat/gbook/ViewEntrySummaries.asp; filter: 0;
global: /users/admin/public_html/dbeat/gbook/.; group_refresh: 3;
groups_refresh: 3; id:
_users_admin_public_html_dbeat_gbook_ViewEntrySummaries_asp____INLINE;
mtime: 948361945; no_cache: ; no_headers: 0; no_session: 0; no_state: ;
pod_comments: 1; r: Apache=SCALAR(0x83f7ed8); remote_ip: 208.32.76.146;
secure_session: ; session_serialize: ; session_timeout: 30;
soft_redirect: ; stat_inc: ; state_db: SDBM_File; state_dir: ./.state;
state_manager: 10;
compiling - package:
_users_admin_public_html_dbeat_gbook_ViewEntrySummaries_asp____INLINE;
/* Connection Pooler */: ?+*{} follows nothing in regexp at (eval 204)
line 1660.
, /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 818

Compile Error


/* Connection Pooler */: ?+*{} follows nothing in regexp at (eval 204)
line 1660.


ASP to Perl Program

  1: package
Apache::ASP::Compiles::_users_admin_public_html_dbeat_gbook_ViewEntrySummaries_asp____INLINE;

  2: no strict;
  3: use vars qw($Application $Session $Response $Server $Request);
  4:
  5: # allow developers to place modules in global directory
  6: use lib qw(/users/admin/public_html/dbeat/gbook/.);
  7:
  8: # aliases here
  9: sub exit { $main::Response->End(); }
 10:
 11: # handler gets called from ASP perl handler to run code
 12: sub handler {
 13:   my($self, $routine) = @_;
 14:
 15:   if($routine && ($routine ne "handler")) {
 16:     return &$routine;
 17:   }
 18:   $self = $routine = undef;
 19:   @_ = ();
 20:
 21: #######################################################
 22: ## Your ASP script has been parsed and inserted here !!
 23: #######################################################
 24:
 25:
 26: $main::Response->Write(
 27: '
 28:
 29: <SCRIPT LANGUAGE=JavaScript RUNAT=Server>
 30: function ConnectionCache()
 31: {
 32:    CPReconnect(this);
 33:
 34:    // create connections array
 35:    if(!this.Connections)
 36:    {
 37:            this.Connections = new Array();
 38:    }
 39:
 40:    return this;
 41: }
 42:
 43: function CPReconnect(Object)
 44: {
 45:    Object.FindConnection = CPFindConnection;
 46:    Object.AddConnection = CPAddConnection;
 47: }
 48:
 49: function CPFindConnection(DSN, UID, PWD)
 50: {
 51:    var Connections = this.Connections;
 52:    for(var i = 0, n = Connections.length; i < n; i++)
 53:    {
 54:            TestPair = Connections[i];
 55:            TestKey = TestPair["Key"];
 56:            if(TestKey["DSN"] != DSN || TestKey["UID"] != UID ||
TestKey["PWD"] != PWD)
 57:            {
 58:                    continue;
 59:            }
 60:            return TestPair["Value"];
 61:    }
 62:    return null;
 63: }
 64:
 65: function CPAddConnection(DSN, UID, PWD, Connection)
 66: {
 67:    var Pair = new Object();
 68:    var Key = new Object();
 69:    Key["DSN"] = DSN;
 70:    Key["UID"] = UID;
 71:    Key["PWD"] = PWD;
 72:    Pair["Key"] = Key;
 73:    Pair["Value"] = Connection;
 74:    var Connections = this.Connections;
 75:    Connections[Connections.length] = Pair;
 76: }
 77:
 78: function CreateConnectionCache()
 79: {
 80:    return new ConnectionCache();
 81: }
 82:
 83: </SCRIPT>
 84: <SCRIPT LANGUAGE=JavaScript RUNAT=Server>
 85: function Recordset(Name, DSN, UID, PWD, SQL, UniqueKeyCols,
Updateable, CursorType, CursorLocation, LockType, TableNames)
 86: {
 87:    RSReconnect(this);
 88:    this.Name = Name;
 89:    this.DSN = DSN;
 90:    this.UID = UID;
 91:    this.PWD = PWD;
 92:    this.SQL = SQL;
 93:    this.OrgSQL = SQL;
 94:    this.Updateable = Updateable;
 95:    this.CursorType = CursorType;
 96:    this.CursorLocation = CursorLocation;
 97:    this.LockType = LockType;
 98:    this.NoRecordMessage = "";
 99:    this.NoFoundMessage = "";
100:    this.RSConnection = "";
101:    this.DTFormat = 0;
102:    this.FilterCriteria = "";
103:    this.OrderByCol = "";
104:    this.Found = true;
105:    this.SupportsApproxPosition = false;
106:    this.SupportsMove = false;
107:    this.SupportsCount = false;
108:    this.ApproxPosition = 1;
109:    this.Separator = "!*+";
110:    this.SpecialChars =
"~@#$%^&*-+=\\\\}{\\"\';:?/><,()_\\f\\n\\r\\t ";
111:    this.TrimCRLF = true;
112:    this.bPreserveInputState = false;
113:    this.Action = "" + Request(this.Name+"_Action");
114:    this.MaxRecords = -1;
115:
116:    // create bindings array
117:    if("" + Request(this.Name + "_Bindings") != "undefined")
118:    {
119:            this.BindingsArray = new Array();
120:            var Bindings = "" + Request(this.Name + "_Bindings");
121:            var nBinding = 0;
122:            for(;;)
123:            {
124:                    var BindIndex =
Bindings.indexOf(this.Separator);
125:                    if(BindIndex >= 0)
126:                    {
127:                            var BoundColumn = Bindings.substring(0,
BindIndex);
128:                            Bindings = Bindings.substring(BindIndex
+ this.Separator.length, Bindings.length);
129:                            BindIndex =
Bindings.indexOf(this.Separator);
130:                            if(BindIndex >= 0)
131:                            {
132:                                    // get the location of the value

133:                                    var BindingType =
Bindings.substring(0, BindIndex);
134:                                    Bindings =
Bindings.substring(BindIndex + this.Separator.length, Bindings.length);
135:
136:                                    // get the value
137:                                    BindIndex =
Bindings.indexOf(this.Separator);
138:                                    if(BindIndex < 0)
139:                                    {
140:                                            BindIndex =
Bindings.length;
141:                                    }
142:                                    var BoundValue =
Bindings.substring(0, BindIndex);
143:
144:                                    var Binding = new Object();
145:                                    Binding["Name"] = BoundColumn;
146:                                    Binding["Type"] = BindingType;
147:                                    Binding["Value"] = BoundValue;
148:                                    this.BindingsArray[nBinding] =
Binding;
149:                                    nBinding++;
150:
151:                                    // next binding
152:                                    if(BindIndex == Bindings.length)

153:                                    {
154:                                            BindIndex = -1;
155:                                    }
156:                                    else
157:                                    {
158:                                            Bindings =
Bindings.substring(BindIndex + this.Separator.length, Bindings.length);
159:                                    }
160:                            }
161:                    }
162:                    if(BindIndex < 0)
163:                    {
164:                            break;
165:                    }
166:            }
167:    }
168:
169:    // set or restore parameters
170:    this.State = "" + Request(this.Name + "_Position");
171:    if(this.State != "undefined")
172:    {
173:            var State = this.State;
174:            if(State != "")
175:            {
176:                    var FilterIndex = State.indexOf("FIL:");
177:                    var OrdIndex = State.indexOf("ORD:");
178:                    var AbsIndex = State.indexOf("ABS:");
179:                    var ParamIndex = State.indexOf("PAR:");
180:                    if(FilterIndex >= 0 && OrdIndex >= 0)
181:                    {
182:                            this.FilterCriteria =
State.substring(FilterIndex + 4, OrdIndex);
183:                    }
184:                    if(OrdIndex >= 0 && AbsIndex >= 0)
185:                    {
186:                            this.OrderByCol =
State.substring(OrdIndex + 4, AbsIndex);
187:                    }
188:                    if(ParamIndex >= 0)
189:                    {
190:
this.RestoreParams(State.substring(ParamIndex + 4, State.length));
191:                    }
192:            }
193:    }
194:    if(this.ParamArray == null && Recordset.arguments.length >
Recordset.length)
195:    {
196:            // set default parameters (variable arguments to this
function)
197:            this.ParamArray = new Array();
198:            var nArgs = Recordset.arguments.length;
199:            var nArg = Recordset.length;
200:            var nParam = 0;
201:            for(; nArg < nArgs; nArg++, nParam++)
202:            {
203:                    var ParmName = "" + Recordset.arguments[nArg];
204:                    nArg++;
205:                    if(nArg >= nArgs)
206:                    {
207:                            break;
208:                    }
209:                    var ParmValue = "" + Recordset.arguments[nArg];
210:                    var Pair = new Object();
211:                    Pair["Name"] = ParmName;
212:                    Pair["Value"] = ParmValue;
213:                    this.ParamArray[nParam] = Pair;
214:            }
215:    }
216:
217:    // create unique key cols array
218:    if(UniqueKeyCols != "")
219:    {
220:            this.UniqueKeyColArray = new Array();
221:            var Temp = UniqueKeyCols;
222:            for(i = 0;;i++)
223:            {
224:                    var Index = Temp.indexOf(",");
225:                    if(Index == -1)
226:                    {
227:                            Index = Temp.length;
228:                    }
229:                    this.UniqueKeyColArray[i] = Temp.substring(0,
Index);
230:                    if(Index == Temp.length)
231:                    {
232:                            break;
233:                    }
234:                    Temp = Temp.substring(Index + 1, Temp.length);
235:            }
236:    }
237:
238:    // create table names array
239:    if(TableNames != "")
240:    {
241:            this.TableNamesArray = new Array();
242:            var nTableName = 0;
243:            for(;;)
244:            {
245:                    var TableNameIndex =
TableNames.indexOf(this.Separator);
246:                    if(TableNameIndex >= 0)
247:                    {
248:                            // get the column index
249:                            var nCol =
parseInt(TableNames.substring(0, TableNameIndex));
250:                            TableNames =
TableNames.substring(TableNameIndex + this.Separator.length,
TableNames.length);
251:                            // get the column name
252:                            TableNameIndex =
TableNames.indexOf(this.Separator);
253:                            if(TableNameIndex < 0)
254:                            {
255:                                    TableNameIndex =
TableNames.length;
256:                            }
257:                            var TableName = TableNames.substring(0,
TableNameIndex);
258:                            var TableNameObj = new Object();
259:                            TableNameObj["nCol"] = nCol;
260:                            TableNameObj["TableName"] = TableName;
261:                            this.TableNamesArray[nTableName] =
TableNameObj;
262:                            nTableName++;
263:
264:                            // next TableName
265:                            if(TableNameIndex == TableNames.length)
266:                            {
267:                                    TableNameIndex = -1;
268:                            }
269:                            else
270:                            {
271:                                    TableNames =
TableNames.substring(TableNameIndex + this.Separator.length,
TableNames.length);
272:                            }
273:                    }
274:                    if(TableNameIndex < 0)
275:                    {
276:                            break;
277:                    }
278:            }
279:    }
280:    return this;
281: }
282:
283: function RSReconnect(Object)
284: {
285:    Object.FindConnection = RSFindConnection;
286:    Object.AddConnection = RSAddConnection;
287:    Object.Open = RSOpen;
288:    Object.GetColumnValue = RSGetColumnValue;
289:    Object.SetColumnValue = RSSetColumnValue;
290:    Object.ProcessAction = RSProcessAction;
291:    Object.MoveFirst = RSMoveFirst;
292:    Object.MoveNext = RSMoveNext;
293:    Object.MovePrevious = RSMovePrevious;
294:    Object.MoveLast = RSMoveLast;
295:    Object.Insert = RSInsert;
296:    Object.Update = RSUpdate;
297:    Object.Delete = RSDelete;
298:    Object.IsBOF = RSIsBOF;
299:    Object.IsEOF = RSIsEOF;
300:    Object.BeginTrans = RSBeginTrans;
301:    Object.CommitTrans = RSCommitTrans;
302:    Object.RollbackTrans = RSRollbackTrans;
303:    Object.Close = RSClose;
304:    Object.Filter = RSFilter;
305:    Object.Find = RSFind;
306:    Object.GetState = RSGetState;
307:    Object.RestoreState = RSRestoreState;
308:    Object.GetKeyVals = RSGetKeyVals;
309:    Object.GetAbsPos = RSGetAbsPos;
310:    Object.OrderBy = RSOrderBy;
311:    Object.SetMessages = RSSetMessages;
312:    Object.SetAction = RSSetAction;
313:    Object.SetOrderByCol = RSSetOrderByCol;
314:    Object.GetOrderbyCol = RSGetOrderByCol;
315:    Object.Move = RSMove;
316:    Object.SetParameter = RSSetParam;
317:    Object.GetParameter = RSGetParam;
318:    Object.GetParams = RSGetParams;
319:    Object.RestoreParams = RSRestoreParams;
320:    Object.SubstituteParams = RSSubstituteParams;
321:    Object.SetMaxRecords = RSSetMaxRecords;
322:    Object.GetMaxRecords = RSGetMaxRecords;
323:    Object.FindBinding = RSFindBinding;
324:    Object.AddBinding = RSAddBinding;
325:    Object.RemoveBinding = RSRemoveBinding;
326:    Object.GetBindingValue = RSGetBindingValue;
327:    Object.SetBindingValue = RSSetBindingValue;
328:    Object.GetBindingType = RSGetBindingType;
329:    Object.SetBindingType = RSSetBindingType;
330:    Object.GetBoundColumnName = RSGetBoundColumnName;
331:    Object.GetBoundColumnNameByIndex = RSGetBoundColumnNameByIndex;
332:    Object.SetRS = RSSetRS;
333:    Object.GetField = RSGetField;
334: }
335:
336: function RSSetRS(RS)
337: {
338:    if(RS)
339:    {
340:            this.RS = RS;
341:    }
342: }
343:
344: function RSGetField(ColName)
345: {
346:    var Field = null;
347:    if(this.TableNamesArray == null)
348:    {
349:            Field = this.RS.Fields.Item(ColName);
350:    }
351:    else
352:    {
353:            // column not found in Fields collection, so look for
table.column
354:            var nDot = ColName.indexOf(".");
355:            if(nDot > 0)
356:            {
357:                    var RSTable = ColName.substring(0, nDot);
358:                    var RSColumn = ColName.substring(nDot + 1,
ColName.length);
359:                    for(var i = 0, n = this.TableNamesArray.length;
i < n; i++)
360:                    {
361:                            var TObj = this.TableNamesArray[i];
362:                            var TableName = TObj["TableName"];
363:                            if(TableName == RSTable)
364:                            {
365:                                    var nCol = TObj["nCol"];
366:
if(this.RS.Fields.Item(nCol).Name == RSColumn)
367:                                    {
368:                                            Field =
this.RS.Fields.Item(nCol);
369:                                            break;
370:                                    }
371:                            }
372:                    }
373:
374:                    // column not found in Fields collection, so
look for user.table.column
375:                    nDot = RSColumn.indexOf(".");
376:                    if(nDot > 0)
377:                    {
378:                            var RSTbl = RSTable + "." +
RSColumn.substring(0, nDot);
379:                            var RSCol = RSColumn.substring(nDot + 1,
RSColumn.length);
380:                            for(var i = 0, n =
this.TableNamesArray.length; i < n; i++)
381:                            {
382:                                    var TObj =
this.TableNamesArray[i];
383:                                    var TableName =
TObj["TableName"];
384:                                    if(TableName == RSTbl)
385:                                    {
386:                                            var nCol = TObj["nCol"];

387:
if(this.RS.Fields.Item(nCol).Name == RSCol)
388:                                            {
389:                                                    Field =
this.RS.Fields.Item(nCol);
390:                                                    break;
391:                                            }
392:                                    }
393:                            }
394:                    }
395:                    else
396:                    {
397:                            Field = this.RS.Fields.Item(RSColumn);
398:                    }
399:            }
400:            else
401:            {
402:                    Field = this.RS.Fields.Item(ColName);
403:            }
404:    }
405:    return Field;
406: }
407:
408: function RSFindConnection(DSN, UID, PWD)
409: {
410:    var Connections = ConnectionCache.Connections;
411:    for(var i = 0, n = Connections.length; i < n; i++)
412:    {
413:            TestPair = Connections[i];
414:            TestKey = TestPair["Key"];
415:            if(TestKey["DSN"] != DSN || TestKey["UID"] != UID ||
TestKey["PWD"] != PWD)
416:            {
417:                    continue;
418:            }
419:            return TestPair["Value"];
420:    }
421:    return null;
422: }
423:
424: function RSAddConnection(DSN, UID, PWD, Connection)
425: {
426:    var Pair = new Object();
427:    var Key = new Object();
428:    Key["DSN"] = DSN;
429:    Key["UID"] = UID;
430:    Key["PWD"] = PWD;
431:    Pair["Key"] = Key;
432:    Pair["Value"] = Connection;
433:    var Connections = ConnectionCache.Connections;
434:    Connections[Connections.length] = Pair;
435: }
436:
437: function RSOpen()
438: {
439:    this.RSConnection = this.FindConnection(this.DSN, this.UID,
this.PWD);
440:    if(this.RSConnection == null)
441:    {
442:            this.RSConnection =
Server.CreateObject("ADODB.Connection");
443:            this.AddConnection(this.DSN, this.UID, this.PWD,
this.RSConnection);
444:    }
445:    if(this.RSConnection)
446:    {
447:            if(!(this.RSConnection.State & 1/*adStateOpen*/))
448:            {
449:                    this.RSConnection.Open("dsn=" + this.DSN +
";uid=" + this.UID + ";pwd=" + this.PWD);
450:            }
451:            this.RS = Server.CreateObject("ADODB.Recordset");
452:            if(this.RS)
453:            {
454:                    if (this.MaxRecords != -1)
455:                    {
456:                            this.RS.MaxRecords = this.MaxRecords;
457:                    }
458:                    var version =
parseFloat(this.RSConnection.Version);
459:                    if (version > 1.0)
460:                    {
461:                            this.RS.CursorLocation =
this.CursorLocation;
462:                    }
463:
464:                    var SQL = this.SQL;
465:                    if(this.OrderByCol != "")
466:                    {
467:                            SQL += " ORDER BY " + this.OrderByCol;
468:                    }
469:                    if(this.ParamArray != null &&
this.ParamArray.length > 0)
470:                    {
471:                            // substitute parameters
472:                            SQL = this.SubstituteParams(SQL);
473:                    }
474:
475:                    this.RS.Open(SQL, this.RSConnection,
this.CursorType, this.LockType);
476:                    if (this.RS.State == 1/*adStateOpen*/)
477:                    {
478:                            this.SupportsApproxPosition =
this.RS.Supports(0x4000/*adApproxPosition*/);
479:                            this.SupportsMove =
this.RS.Supports(0x200/*adMovePrevious*/);
480:                            this.SupportsCount = this.RS.RecordCount
!= -1;
481:                            this.RestoreState();
482:                    }
483:                    else
484:                    {
485:                            Response.Write("<BR>Error: Unable to
open Recordset!<BR>");
486:                    }
487:            }
488:    }
489: }
490:
491: function RSSetAction(action)
492: {
493:    this.Action = "" + action;
494: }
495:
496: function RSSetOrderByCol(OrderByCol)
497: {
498:    this.OrderByCol = OrderByCol;
499: }
500:
501: function RSGetOrderByCol()
502: {
503:    return this.OrderByCol;
504: }
505:
506: function RSRestoreState()
507: {
508:    var Action = this.Action;
509:    if(Action != \'Insert\' && Action != \'Close\' &&
Action.indexOf(\'Filter(\') < 0)
510:    {
511:            if(this.State != "undefined")
512:            {
513:                    var Position = this.State;
514:                    var FilterIndex = Position.indexOf("FIL:");
515:                    var OrdIndex = Position.indexOf("ORD:");
516:                    var AbsIndex = Position.indexOf("ABS:");
517:                    var KeyIndex = Position.indexOf("KEY:");
518:                    var ParamIndex = Position.indexOf("PAR:");
519:                    if(ParamIndex < 0)
520:                    {
521:                            ParamIndex = Position.length;
522:                    }
523:
524:                    // reapply filter
525:                    if(this.FilterCriteria != "")
526:                    {
527:                            this.Filter(this.FilterCriteria);
528:                    }
529:
530:                    //if the filter produces an empty recordset ,
return
531:                    if (this.IsEOF())
532:                    {
533:                            return -1;
534:                    }
535:
536:                    // move to previous position
537:                    if(KeyIndex >= 0 && AbsIndex >= 0)
538:                    {
539:                            var Abs = Position.substring(AbsIndex +
4, KeyIndex);
540:                            var Key = "";
541:                            if((KeyIndex + 4) < ParamIndex)
542:                            {
543:                                    Key =
Position.substring(KeyIndex + 4, ParamIndex);
544:                            }
545:
546:                            // build array of unique keys
547:                            var KeyArray = null;
548:                            if(this.UniqueKeyColArray != null && Key
!= "")
549:                            {
550:                                    KeyArray = new Array();
551:                                    for(i = 0;; i++)
552:                                    {
553:                                            var Index =
Key.indexOf(this.Separator);
554:                                            if(Index == -1)
555:                                            {
556:                                                    Index =
Key.length;
557:                                            }
558:                                            KeyArray[i] =
Key.substring(0, Index);
559:                                            if(Index == Key.length)
560:                                            {
561:                                                    break;
562:                                            }
563:                                            Key =
Key.substring(Index + 3, Key.length);
564:                                    }
565:                            }
566:
567:                            if(this.SupportsApproxPosition == true)
568:                            {
569:                                    if(Abs != "")
570:                                    {
571:                                            if(Abs == "BOF")
572:                                            {
573:
this.RS.MovePrevious();
574:                                            }
575:                                            else if(Abs == "EOF")
576:                                            {
577:
this.RS.MoveLast();
578:
this.RS.MoveNext();
579:                                            }
580:                                            else
581:                                            {
582:                                                    if(Abs != "MTY")
// was empty
583:                                                    {
584:
this.RS.Move(parseInt(Abs) - 1);
585:                                                    }
586:                                            }
587:                                    }
588:                                    if(Key != "")
589:                                    {
590:                                            // fan out from current
position looking for key
591:
if(this.UniqueKeyColArray.length == KeyArray.length)
592:                                            {
593:                                                    var GotBOF =
false;
594:                                                    var GotEOF =
false;
595:                                                    var Direction =
-1;
596:                                                    var Count = 1;
597:                                                    var n =
this.UniqueKeyColArray.length;
598:                                                    for(;;)
599:                                                    {
600:                                                            // test
for match to key
601:
this.Found = true;
602:                                                            for(i =
0; i < n; i++)
603:                                                            {
604:
if(String(this.GetField(this.UniqueKeyColArray[i]).Value) !=
String(KeyArray[i]))
605:
{
606:
this.Found = false;
607:
break;
608:
}
609:                                                            }
610:
if(this.Found == false)
611:                                                            {
612:
// key mismatch
613:
if(Direction < 0)
614:
{
615:
if(GotBOF == false)
616:
{
617:
this.RS.Move(Count * Direction);
618:
if(GotEOF == false)
619:
{
620:
Direction *= -1;
621:
}
622:
if(this.RS.BOF)
623:
{
624:
GotBOF = true;
625:
if(!GotEOF)
626:
{
627:
this.RS.MoveNext();
628:
this.RS.Move(Count);
629:
Count = 1;
630:
if(this.RS.EOF)
631:
{
632:
GotEOF = true;
633:
}
634:
}
635:
}
636:
else if(GotEOF == false)
637:
{
638:
Count++;
639:
}
640:
}
641:
}
642:
else
643:
{
644:
if(GotEOF == false)
645:
{
646:
this.RS.Move(Count * Direction);
647:
if(GotBOF == false)
648:
{
649:
Direction *= -1;
650:
}
651:
if(this.RS.EOF)
652:
{
653:
GotEOF = true;
654:
if(!GotBOF)
655:
{
656:
this.RS.MovePrevious();
657:
this.RS.Move(-Count);
658:
Count = 1;
659:
if(this.RS.BOF)
660:
{
661:
GotBOF = true;
662:
}
663:
}
664:
}
665:
else if(GotBOF == false)
666:
{
667:
Count++;
668:
}
669:
}
670:
}
671:                                                            }
672:
if(GotBOF == true && GotEOF == true)
673:                                                            {
674:
// key not found so move to abs position
675:
if(this.RS.BOF)
676:
{
677:
this.RS.MoveNext();
678:
}
679:
else
680:
{
681:
this.RS.MoveFirst();
682:
}
683:
if(Abs != "")
684:
{
685:
if(Abs == "BOF")
686:
{
687:
this.RS.MovePrevious();
688:
}
689:
else if(Abs == "EOF")
690:
{
691:
this.RS.MoveLast();
692:
this.RS.MoveNext();
693:
}
694:
else
695:
{
696:
var Increment = 1;
697:
var Action = this.Action;
698:
if(Action == \'Previous\')
699:
{
700:
if(Direction == 1)
701:
{
702:
Increment--;
703:
}
704:
}
705:
else if(Action == \'Next\')
706:
{
707:
if(Direction == -1)
708:
{
709:
Increment++;
710:
}
711:
}
712:
713:
this.RS.Move(parseInt(Abs) - Increment);
714:
}
715:
}
716:
break;
717:                                                            }
718:
if(this.Found == true)
719:                                                            {
720:
break;
721:                                                            }
722:                                                    }
723:                                            }
724:                                    }
725:                            }
726:                            else // SupportsApproxPosition == false
727:                            {
728:                                    if(KeyArray != null)
729:                                    {
730:                                            // move forward through
recordset until key is found
731:                                            while(!this.IsEOF())
732:                                            {
733:                                                    var n =
this.UniqueKeyColArray.length;
734:                                                    this.Found =
true;
735:                                                    for(i = 0; i <
n; i++)
736:                                                    {
737:
if(String(this.GetField(this.UniqueKeyColArray[i]).Value) !=
String(KeyArray[i]))
738:                                                            {
739:
this.Found = false;
740:
break;
741:                                                            }
742:                                                    }
743:                                                    if(this.Found)
744:                                                    {
745:                                                            break;
746:                                                    }
747:                                                    else
748:                                                    {
749:
this.MoveNext();
750:                                                    }
751:                                            }
752:
753:                                    }
754:                                    else if(Abs != "" && Abs !=
"MTY")
755:                                    {
756:                                            // move forward through
recordset until approx position is found
757:                                            if(this.SupportsMove)
758:                                            {
759:
this.RS.Move(parseInt(Abs) - 1);
760:
this.ApproxPosition = Abs;
761:                                            }
762:                                            else
763:                                            {
764:                                                    Abs =
parseInt(Abs);
765:
this.ApproxPosition = 1;
766:
while(this.ApproxPosition != Abs)
767:                                                    {
768:
this.RS.MoveNext();
769:
this.ApproxPosition++;
770:                                                    }
771:                                            }
772:                                    }
773:                            }
774:                    }
775:            }
776:    }
777: }
778:
779: function RSGetState()
780: {
781:    if (this.bPreserveInputState)
782:    {
783:            return this.State;
784:    }
785:
786:    return "FIL:" + this.FilterCriteria + "ORD:" + this.OrderByCol +
"ABS:" + this.GetAbsPos() + "KEY:" + this.GetKeyVals() + "PAR:" +
this.GetParams();
787: }
788:
789:
790: function RSGetMaxRecords()
791: {
792:    return this.RS.MaxRecords;
793: }
794:
795: function RSSetMaxRecords(lMaxRecords)
796: {
797:    this.MaxRecords = lMaxRecords;
798:    this.RS.MaxRecords = lMaxRecords;
799: }
800:
801: function RSGetKeyVals()
802: {
803:    var KeyVals = "";
804:    if(this.UniqueKeyColArray != null)
805:    {
806:            var n = this.UniqueKeyColArray.length;
807:            if(n > 0)
808:            {
809:                    var First = true;
810:                    for(i = 0; i < n; i++)
811:                    {
812:                            if(First == true)
813:                            {
814:                                    First = false;
815:                            }
816:                            else
817:                            {
818:                                    KeyVals += this.Separator;
819:                            }
820:                            if(!this.IsBOF() && !this.IsEOF())
821:                            {
822:                                    var Field =
this.GetField(this.UniqueKeyColArray[i]);
823:                                    if(Field != null)
824:                                    {
825:                                            KeyVals +=
String(Field.Value);
826:                                    }
827:                            }
828:                    }
829:            }
830:    }
831:    return KeyVals;
832: }
833:
834: function RSGetAbsPos()
835: {
836:    var AbsPos = "";
837:    if ((this.RS.State == 0/*adStateClosded*/)||(this.IsBOF() &&
this.IsEOF()))
838:    {
839:            AbsPos = "MTY"; // empty result set
840:    }
841:    else
842:    {
843:            if(this.SupportsApproxPosition)
844:            {
845:                    var nAbsPos = this.RS.AbsolutePosition;
846:                    if(nAbsPos == -2/*adPosBOF*/)
847:                    {
848:                            AbsPos += "BOF";
849:                    }
850:                    else if(nAbsPos == -3)
851:                    {
852:                            AbsPos += "EOF";
853:                    }
854:                    else
855:                    {
856:                            AbsPos += nAbsPos;
857:                    }
858:            }
859:            else
860:            {
861:                    AbsPos += this.ApproxPosition;
862:            }
863:    }
864:    return AbsPos;
865: }
866:
867: function RSGetParams()
868: {
869:    var Params = "";
870:    if(this.ParamArray != null)
871:    {
872:            var n = this.ParamArray.length;
873:            if(n > 0)
874:            {
875:                    var First = true;
876:                    for(i = 0; i < n; i++)
877:                    {
878:                            if(First == true)
879:                            {
880:                                    First = false;
881:                            }
882:                            else
883:                            {
884:                                    Params += this.Separator;
885:                            }
886:                            Pair = this.ParamArray[i];
887:                            Params += Pair["Name"];
888:                            Params += "=";
889:                            Params += Pair["Value"];
890:                    }
891:            }
892:    }
893:    return Params;
894: }
895:
896: function RSGetColumnValue(ColName)
897: {
898:    if(this.IsBOF() || this.IsEOF())
899:    {
900:            var Action = "" + this.Action;
901:            if ((Action == "Previous") || (Action == "Next"))
902:            {
903:                    return this.NoRecordMessage;
904:            }
905:            else
906:            {
907:                    return this.NoFoundMessage
908:            }
909:    }
910:    var Field = this.GetField(ColName);
911:    if(Field != null)
912:    {
913:            if(this.DTFormat >= 0)
914:            {
915:                    var ColType = Field.Type;
916:                    switch(ColType)
917:                    {
918:                            case 7:         /*adDate*/
919:                            case 133:       /*adDBDate*/
920:                            case 134:       /*adDBTime*/
921:                            case 135:       /*adDBTimeStamp*/
922:                                    return
RSFormatDateTime(Field.Value, this.DTFormat);
923:                            default:
924:                                    break;
925:                    }
926:            }
927:            return Field.Value;
928:    }
929:    return "";
930: }
931:
932: function RSSetColumnValue(ColName, Val)
933: {
934:    if(!this.IsBOF() && !this.IsEOF())
935:    {
936:            var Field = this.GetField(ColName);
937:            if(Field != null)
938:            {
939:                    Field.Value = Val;
940:            }
941:    }
942: }
943:
944: function RSProcessAction()
945: {
946:    var Action = this.Action;
947:    if(Action.indexOf(\'Find(\') == 0)
948:    {
949:            eval(this.Name + \'.\' + Action);
950:    }
951:    else if(Action.indexOf(\'Filter(\') == 0)
952:    {
953:            eval(this.Name + \'.\' + Action);
954:    }
955:    else
956:    {
957:            Action = "" + this.Action;
958:            if(Action == \'First\')
959:            {
960:                    this.MoveFirst();
961:            }
962:            else if (Action == \'Previous\')
963:            {
964:                    this.MovePrevious();
965:            }
966:            else if (Action == \'Next\')
967:            {
968:                    this.MoveNext();
969:            }
970:            else if (Action == \'Last\')
971:            {
972:                    this.MoveLast();
973:            }
974:            else if (Action == \'Insert\')
975:            {
976:                    this.Insert();
977:            }
978:            else if(Action == \'Update\')
979:            {
980:                    this.Update();
981:            }
982:            else if(Action == \'Delete\')
983:            {
984:                    this.Delete();
985:            }
986:            else if(Action == \'Close\')
987:            {
988:                    this.Close();
989:            }
990:            else if(Action.indexOf(\'Sort\') == 0)
991:            {
992:                    this.OrderBy();
993:            }
994:            else if(Action.indexOf(\'OrderBy(\') == 0)
995:            {
996:                    eval(this.Name + \'.\' + Action);
997:            }
998:    }
999: }
1000:
1001: function RSSetMessages(NoRecordMessage, NoFoundMessage)
1002: {
1003:   this.NoRecordMessage = NoRecordMessage;
1004:   this.NoFoundMessage = NoFoundMessage;
1005: }
1006:
1007: function RSMoveFirst()
1008: {
1009:   if(this.RS.BOF)
1010:   {
1011:           if(!(this.RS.EOF))
1012:           {
1013:                   this.RS.MoveNext();
1014:           }
1015:   }
1016:   else
1017:   {
1018:           if(this.SupportsMove)
1019:           {
1020:                   this.RS.MoveFirst();
1021:           }
1022:           else
1023:           {
1024:                   this.RS.Requery();
1025:           }
1026:   }
1027:   this.ApproxPosition = 1;
1028: }
1029:
1030: function RSMoveNext()
1031: {
1032:   if(!(this.RS.EOF))
1033:   {
1034:           this.RS.MoveNext();
1035:           this.ApproxPosition++;
1036:   }
1037: }
1038:
1039: function RSMovePrevious()
1040: {
1041:   if(!(this.RS.BOF))
1042:   {
1043:           if(this.SupportsMove)
1044:           {
1045:                   this.RS.MovePrevious();
1046:                   this.ApproxPosition--;
1047:           }
1048:           else
1049:           {
1050:                   var ApproxPosition = this.ApproxPosition - 1;
1051:                   this.MoveFirst();
1052:                   while(this.ApproxPosition < ApproxPosition)
1053:                   {
1054:                           this.RS.MoveNext();
1055:                           this.ApproxPosition++;
1056:                   }
1057:           }
1058:   }
1059: }
1060:
1061: function RSMoveLast()
1062: {
1063:   if(this.RS.EOF)
1064:   {
1065:           this.MovePrevious();
1066:   }
1067:   else
1068:   {
1069:           if(this.SupportsMove && this.SupportsCount)
1070:           {
1071:                   this.RS.MoveLast();
1072:                   this.ApproxPosition = this.RS.RecordCount;
1073:           }
1074:           else
1075:           {
1076:                   if(this.SupportsCount)
1077:                   {
1078:                           var RecordCount = this.RS.RecordCount;
1079:                           if(RecordCount > 0)
1080:                           {
1081:                                   while(this.ApproxPosition <
RecordCount)
1082:                                   {
1083:                                           this.RS.MoveNext();
1084:                                           this.ApproxPosition++;
1085:                                   }
1086:                           }
1087:                   }
1088:                   else
1089:                   {
1090:                           var LastRecord = 1;
1091:                           this.MoveFirst();
1092:                           while(!this.RS.EOF)
1093:                           {
1094:                                   this.RS.MoveNext();
1095:                                   LastRecord++;
1096:                           }
1097:                           LastRecord--;
1098:                           this.MoveFirst();
1099:                           while(this.ApproxPosition < LastRecord)
1100:                           {
1101:                                   this.MoveNext();
1102:                           }
1103:                   }
1104:           }
1105:   }
1106: }
1107:
1108:
1109: function RSMove(offset)
1110: {
1111:   if(this.SupportsApproxPosition)
1112:   {
1113:           this.RS.Move(offset);
1114:           this.ApproxPosition += offset;
1115:   }
1116:   else
1117:   {
1118:           if(offset > 0)
1119:           {
1120:                   while(offset > 0)
1121:                   {
1122:                           this.RS.MoveNext();
1123:                           this.ApproxPosition++;
1124:                           offset--;
1125:                           if(this.RS.EOF)
1126:                           {
1127:                                   break;
1128:                           }
1129:                   }
1130:           }
1131:           else
1132:           {
1133:                   var ApproxPosition = this.ApproxPosition -
offset;
1134:                   if(ApproxPosition < 1)
1135:                   {
1136:                           ApproxPosition = 1;
1137:                   }
1138:                   this.MoveFirst();
1139:                   while(this.ApproxPosition < ApproxPosition)
1140:                   {
1141:                           this.RS.MoveNext();
1142:                           this.ApproxPosition++;
1143:                   }
1144:           }
1145:   }
1146: }
1147:
1148: function RSInsert()
1149: {
1150:   if(this.Updateable != false)
1151:   {
1152:           this.RS.AddNew();
1153:           this.Update();
1154:   }
1155: }
1156:
1157: function RSUpdate()
1158: {
1159:   if(this.Updateable == true && this.Found == true)
1160:   {
1161:           if(this.BindingsArray != null)
1162:           {
1163:                   var nBindings = this.BindingsArray.length;
1164:                   for(var nBinding = 0; nBinding < nBindings;
nBinding++)
1165:                   {
1166:                           var Binding =
this.BindingsArray[nBinding];
1167:                           var BoundColumn = Binding["Name"];
1168:                           var BindingType = Binding["Type"];
1169:                           var FormElement = null;
1170:                           var BoundValue = Binding["Value"];
1171:                           var DoUpdate = true;
1172:
1173:                           if(BindingType == "FRM") // form element
name
1174:                           {
1175:                                   FormElement = BoundValue;
1176:                                   if(String(Request(FormElement))
!= "undefined")
1177:                                   {
1178:                                           BoundValue =
Request(FormElement);
1179:                                   }
1180:                                   else
1181:                                   {
1182:                                           BoundValue = "";
1183:                                   }
1184:                           }
1185:                           else if(BindingType == "VAR") //
javascript variable
1186:                           {
1187:                                   BoundValue = eval(BoundValue);
1188:                           }
1189:                           else if(BindingType != "VAL") // literal
value
1190:                           {
1191:                                   DoUpdate = false;
1192:                           }
1193:
1194:                           // check whether new value is different
from old value
1195:                           var Field = this.GetField(BoundColumn);
1196:                           if(Field != null && DoUpdate == true &&
String(Field.Value) != String(BoundValue))
1197:                           {
1198:                                   // put the value into the column

1199:                                   if((String(BoundValue) == "") &&
(Field.Attributes & 0x00000020/*adFldIsNullable*/))
1200:                                   {
1201:                                           Field.Value = null;
1202:                                   }
1203:                                   else if(FormElement != null &&
String(Request(FormElement)) == "undefined")
1204:                                   {
1205:                                           // handle the unchecked
state for checkbox control
1206:                                           if(Field.Type ==
11/*adBoolean*/)
1207:                                           {
1208:                                                   Field.Value =
"0";
1209:                                           }
1210:                                   }
1211:                                   else
1212:                                   {
1213:                                           if(this.TrimCRLF ==
true)
1214:                                           {
1215:                                                   var ColType =
Field.Type;
1216:                                                   if(ColType ==
129/*adChar*/ ||
1217:                                                           ColType
== 200/*adVarChar*/ ||
1218:                                                           ColType
== 201/*adLongVarChar*/ ||
1219:                                                           ColType
== 8/*adBSTR*/)
1220:                                                   {
1221:
BoundValue = RSTrimCRLF(BoundValue);
1222:                                                   }
1223:                                           }
1224:                                           Field.Value =
String(BoundValue);
1225:                                   }
1226:                           }
1227:                   }
1228:           }
1229:           this.RS.Update();
1230:   }
1231: }
1232:
1233: function RSDelete()
1234: {
1235:   if(this.Updateable == true && this.Found == true &&
!this.IsEOF() && !this.IsBOF())
1236:   {
1237:           this.RS.Delete();
1238:           this.MoveNext();
1239:           if(this.IsEOF())
1240:           {
1241:                   this.MovePrevious();
1242:           }
1243:   }
1244: }
1245:
1246: function RSIsBOF()
1247: {
1248:   return this.RS.BOF;
1249: }
1250:
1251: function RSIsEOF()
1252: {
1253:   return this.RS.EOF;
1254: }
1255:
1256: function RSBeginTrans()
1257: {
1258:   this.RSConnection.BeginTrans();
1259: }
1260:
1261: function RSCommitTrans()
1262: {
1263:   this.RSConnection.CommitTrans();
1264: }
1265:
1266: function RSRollbackTrans()
1267: {
1268:   this.RSConnection.RollbackTrans();
1269: }
1270:
1271: function RSClose()
1272: {
1273:   this.RS.Close();
1274: }
1275:
1276: function RSFilter(Where)
1277: {
1278:   if(Where == null)
1279:   {
1280:           Where = "";
1281:   }
1282:
1283:   this.FilterCriteria = Where;
1284:   this.RS.Filter = Where;
1285: }
1286:
1287: function RSFind(ColumnName, Key)
1288: {
1289:
1290:   var nArgs = RSFind.arguments.length;
1291:   while(!this.IsEOF())
1292:   {
1293:           var nArg = 0;
1294:           var KeyValueFound = true;
1295:           for(; nArg < nArgs; nArg++)
1296:           {
1297:                   ColumnName = "" + RSFind.arguments[nArg];
1298:                   nArg++;
1299:                   var Key = "" + RSFind.arguments[nArg];
1300:                   if(String(this.GetField(ColumnName).Value) !=
String(Key))
1301:                   {
1302:                           KeyValueFound = false;
1303:                           break;
1304:                   }
1305:           }
1306:           if(KeyValueFound)
1307:           {
1308:                   break;
1309:           }
1310:           else
1311:           {
1312:                   this.MoveNext();
1313:           }
1314:   }
1315: }
1316:
1317: function RSOrderBy(OrderByCol)
1318: {
1319:   if(OrderByCol != "")
1320:   {
1321:           this.SetOrderByCol(OrderByCol);
1322:           this.Close();
1323:           this.Open();
1324:   }
1325: }
1326:
1327: function RSSetParam(Name, Value)
1328: {
1329:   var Pair = null;
1330:   if(this.ParamArray == null)
1331:   {
1332:           this.ParamArray = new Array();
1333:   }
1334:   else
1335:   {
1336:           // find name
1337:           for(i = 0, n = this.ParamArray.length; i < n; i++)
1338:           {
1339:                   Target = this.ParamArray[i];
1340:                   if(Target["Name"] == Name)
1341:                   {
1342:                           Pair = Target;
1343:                           break;
1344:                   }
1345:           }
1346:   }
1347:   if(Pair == null)
1348:   {
1349:           // create new
1350:           Pair = new Object();
1351:           Pair["Name"] = Name;
1352:           this.ParamArray[this.ParamArray.length] = Pair;
1353:   }
1354:   Pair["Value"] = Value;
1355: }
1356:
1357: function RSRestoreParams(Params)
1358: {
1359:   if(Params != null && Params != "")
1360:   {
1361:           this.ParamArray = new Array();
1362:           for(i = 0;; i++)
1363:           {
1364:                   var Index = Params.indexOf(this.Separator);
1365:                   if(Index == -1)
1366:                   {
1367:                           Index = Params.length;
1368:                   }
1369:                   var NameValue = Params.substring(0, Index);
1370:                   var Pair = new Object();
1371:                   var Eq = NameValue.indexOf("=");
1372:                   Pair["Name"] = NameValue.substring(0, Eq);
1373:                   Pair["Value"] = NameValue.substring(Eq + 1,
NameValue.length);
1374:                   this.ParamArray[i] = Pair;
1375:                   if(Index == Params.length)
1376:                   {
1377:                           break;
1378:                   }
1379:                   Params = Params.substring(Index + 3,
Params.length);
1380:           }
1381:   }
1382: }
1383:
1384: function RSGetParam(Name)
1385: {
1386:   if(this.ParamArray == null)
1387:   {
1388:           return null;
1389:   }
1390:
1391:   // find name
1392:   for(i = 0, n = this.ParamArray.length; i < n; i++)
1393:   {
1394:           Target = this.ParamArray[i];
1395:           if(Target["Name"] == Name)
1396:           {
1397:                   return Target["Value"];
1398:           }
1399:   }
1400: }
1401:
1402: function RSSubstituteParams(SQL)
1403: {
1404:   for(i = 0, n = this.ParamArray.length; i < n; i++)
1405:   {
1406:           var Param = this.ParamArray[i];
1407:           var ParamName = Param["Name"];
1408:           var nIndex = -1;
1409:           do
1410:           {
1411:                   nIndex = SQL.indexOf(ParamName, nIndex + 1);
1412:                   if(nIndex > 0)
1413:                   {
1414:                           // found an occurrance of the param name

1415:                           // now see whether it is a token or not
by
1416:                           // testing the character before and
after
1417:                           var C1 = SQL.charAt(nIndex - 1);
1418:                           var C2 = \'~\';
1419:                           if((nIndex + ParamName.length) <
SQL.length)
1420:                           {
1421:                                   C2 = SQL.charAt(nIndex +
ParamName.length);
1422:                           }
1423:                           if((this.SpecialChars.indexOf(C1) != -1)
&& (this.SpecialChars.indexOf(C2) != -1))
1424:                           {
1425:                                   var NewSQL = SQL.slice(0,
nIndex);
1426:                                   NewSQL += Param["Value"];
1427:                                   NewSQL += SQL.slice(nIndex +
ParamName.length, SQL.length);
1428:                                   SQL = NewSQL;
1429:                           }
1430:                   }
1431:                   nIndex++;
1432:           } while(nIndex > 0 && nIndex < SQL.length);
1433:   }
1434:   return SQL;
1435: }
1436:
1437: function RSFindBinding(ColumnName)
1438: {
1439:   if(this.BindingsArray != null)
1440:   {
1441:           for(i = 0, n = this.BindingsArray.length; i < n; i++)
1442:           {
1443:                   BindingObj = this.BindingsArray[i];
1444:                   if(BindingObj["Name"] == ColumnName)
1445:                   {
1446:                           return BindingObj;
1447:                   }
1448:           }
1449:   }
1450:   return null;
1451: }
1452:
1453: function RSAddBinding(ColumnName, BoundValue, BindingType)
1454: {
1455:   if(this.BindingsArray == null)
1456:   {
1457:           this.BindingsArray = new Array();
1458:   }
1459:   BindingObj = this.FindBinding(ColumnName);
1460:   if(BindingObj == null)
1461:   {
1462:           BindingObj = new Object();
1463:           BindingObj["Name"] = ColumnName;
1464:           this.BindingsArray[this.BindingsArray.length] =
BindingObj;
1465:   }
1466:   BindingObj["Type"] = BindingType;
1467:   BindingObj["Value"] = BoundValue;
1468: }
1469:
1470: function RSRemoveBinding(ColumnName)
1471: {
1472:   if(this.BindingsArray != null && this.BindingsArray.length)
1473:   {
1474:           BindingsArray = new Array();
1475:           for(i = 0, n = this.BindingsArray.length; i < n; i++)
1476:           {
1477:                   BindingObj = this.BindingsArray[i];
1478:                   if(BindingObj["Name"] != ColumnName)
1479:                   {
1480:                           BindingsArray[BindingsArray.length] =
BindingObj;
1481:                   }
1482:           }
1483:           this.BindingsArray = null;
1484:           this.BindingsArray = new Array();
1485:           if(BindingsArray.length)
1486:           {
1487:                   for(i = 0, n = BindingsArray.length; i < n; i++)

1488:                   {
1489:                           this.BindingsArray[i] =
BindingsArray[i];
1490:                   }
1491:           }
1492:           BindingsArray = null;
1493:   }
1494: }
1495:
1496: function RSGetBindingValue(ColumnName)
1497: {
1498:   BindingObj = this.FindBinding(ColumnName);
1499:   if(BindingObj == null)
1500:   {
1501:           return "";
1502:   }
1503:   return BindingObj["Value"];
1504: }
1505:
1506: function RSSetBindingValue(ColumnName, BoundValue)
1507: {
1508:   BindingObj = this.FindBinding(ColumnName);
1509:   if(BindingObj != null)
1510:   {
1511:           BindingObj["Value"] = BoundValue;
1512:   }
1513: }
1514:
1515: function RSGetBindingType(ColumnName)
1516: {
1517:   BindingObj = this.FindBinding(ColumnName);
1518:   if(BindingObj == null)
1519:   {
1520:           return "";
1521:   }
1522:   return BindingObj["Type"];
1523: }
1524:
1525: function RSSetBindingType(ColumnName, BindingType)
1526: {
1527:   BindingObj = this.FindBinding(ColumnName);
1528:   if(BindingObj != null)
1529:   {
1530:           BindingObj["Type"] = BindingType;
1531:   }
1532: }
1533:
1534: function RSGetBoundColumnName(BoundValue, BindingType)
1535: {
1536:   if(this.BindingsArray != null && this.BindingsArray.length)
1537:   {
1538:           for(i = 0, n = this.BindingsArray.length; i < n; i++)
1539:           {
1540:                   BindingObj = this.BindingsArray[i];
1541:                   if(BindingObj["Value"] == BoundValue &&
BindingObj["Type"] == BindingType)
1542:                   {
1543:                           return BindingObj["Name"];
1544:                   }
1545:           }
1546:   }
1547:   return "";
1548: }
1549:
1550: function RSGetBoundColumnNameByIndex(Index)
1551: {
1552:   if(this.BindingsArray != null && Index >= 0 && Index <
this.BindingsArray.length)
1553:   {
1554:           BindingObj = this.BindingsArray[Index];
1555:           return BindingObj["Name"];
1556:   }
1557:   return "";
1558: }
1559:
1560:
1561: function CreateRS(Name, DSN, UID, PWD, SQL, UniqueKeyCols,
Updateable, CursorType, CursorLocation, LockType, TableNames)
1562: {
1563:   var Object;
1564:   if(CreateRS.arguments.length > CreateRS.length)
1565:   {
1566:           // variable args
1567:           var EvalMe = "Object = new Recordset(Name, DSN, UID,
PWD, SQL, UniqueKeyCols, Updateable, CursorType, CursorLocation,
LockType, TableNames";
1568:           var nArgs = CreateRS.arguments.length;
1569:           var nArg = CreateRS.length;
1570:           for(; nArg < nArgs; nArg++)
1571:           {
1572:                   EvalMe += ", CreateRS.arguments[" + nArg + "]";
1573:           }
1574:           EvalMe += ");"
1575:           eval(EvalMe);
1576:   }
1577:   else
1578:   {
1579:           Object = new Recordset(Name, DSN, UID, PWD, SQL,
UniqueKeyCols, Updateable, CursorType, CursorLocation, LockType,
TableNames);
1580:   }
1581:   return Object;
1582: }
1583:
1584: function iif(cond, X, Y)
1585: {
1586:   if(cond)
1587:   {
1588:           return X;
1589:   }
1590:   return Y;
1591: }
1592:
1593: function iifWithHTMLEncode(cond, X, Y)
1594: {
1595:   if(cond)
1596:   {
1597:           if(X == null)
1598:           {
1599:                   X = "";
1600:           }
1601:           return Server.HTMLEncode(X);
1602:   }
1603:   return Y;
1604: }
1605:
1606:
1607: function RSTrimCRLF(Value)
1608: {
1609:   TrimValue = "" + Value;
1610:   CRLFIndex = TrimValue.length;
1611:   CRLFIndex = CRLFIndex -1;
1612:   if(CRLFIndex >= 0)
1613:   {
1614:           for (;;)
1615:           {
1616:                   if ((TrimValue.charAt(CRLFIndex) != \'\\n\') &&
(TrimValue.charAt(CRLFIndex) != \'\\r\'))
1617:                   {
1618:                           break;
1619:                   }
1620:                   else
1621:                   {
1622:                           CRLFIndex--;
1623:                   }
1624:           }
1625:
1626:           if (CRLFIndex < 0)
1627:           {
1628:                   CRLFIndex =0;
1629:           }
1630:
1631:           TrimValue = TrimValue.substring(0,CRLFIndex+1);
1632:   }
1633:
1634:   return TrimValue;
1635: }
1636:
1637: function ReplaceSingleQuoteWithTwo(Value)
1638: {
1639:   var re = /\'/i;
1640:   var RValue = String(Value).replace(re, "\'\'");
1641:   return RValue;
1642: }
1643:
1644: </SCRIPT>
1645:
1646: <SCRIPT LANGUAGE=VBScript RUNAT=Server>
1647: function RSFormatDateTime(Date, NamedFormat)
1648:   if Date then
1649:           RSFormatDateTime = FormatDateTime(Date, NamedFormat)
1650:   else
1651:           RSFormatDateTime = Date
1652:   end if
1653: end function
1654: </SCRIPT>
1655:
1656: '
1657: );
1658:
1659: ## CODE BEGIN ##
1660: /* Connection Pooler */
1661: var ConnectionCache = new ConnectionCache()
1662: /* server-side recordset */
1663: var GuestBookRecordset = new Recordset("GuestBookRecordset", "",
"", "", "", "", true, 2, 3, 3, "");
1664: GuestBookRecordset_BeforeOpen();
1665: GuestBookRecordset.Open();
1666: GuestBookRecordset.ProcessAction();
1667: GuestBookRecordset.SetMessages("","");
1668: ## END ##
1669:
1670: ## CODE BEGIN ##
1671: function GuestBookRecordset_BeforeOpen() {
1672:
1673: }
1674: ## END ##
1675:
1676: $main::Response->Write(
1677: '
1678: <HTML>
1679: <HEAD>
1680: <META NAME="GENERATOR" CONTENT="Elemental Software Drumbeat 2000
3.04.411">
1681: <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=iso-8859-1">
1682:
1683: <TITLE>Drumbeat 2000 - Guest Book Starting Point - Entry
Summaries</TITLE>
1684: </HEAD>
1685: <BODY TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0
BACKGROUND="media/images/bk_GuestBook.GIF" BGColor="#ffffff"
LINK="#0000ff" ALink="#00ff00" VLINK="#ff0000">
1686:
1687: <A NAME="StartOfPage"></A>
1688:
1689:
1690: <FORM  NAME="GuestBookViewSummariesForm" METHOD="Post"
ACTION="ViewEntrySummaries.asp">
1691:
1692:   <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
1693:     <TR>
1694:       <TD WIDTH=10 HEIGHT=90></TD>
1695:       <TD WIDTH=16 HEIGHT=90></TD>
1696:       <TD WIDTH=2 HEIGHT=90></TD>
1697:       <TD WIDTH=104 HEIGHT=90></TD>
1698:       <TD WIDTH=4 HEIGHT=90></TD>
1699:       <TD WIDTH=90 HEIGHT=90></TD>
1700:       <TD WIDTH=15 HEIGHT=90></TD>
1701:       <TD WIDTH=300 HEIGHT=90></TD>
1702:       <TD WIDTH=60 HEIGHT=90></TD>
1703:     </TR>
1704:     <TR>
1705:       <TD WIDTH=10 HEIGHT=44></TD>
1706:       <TD VALIGN=TOP WIDTH=122 COLSPAN=3><A HREF="Index.asp"><IMG
Name="Image1" SRC="media/images/bt_MainPage.gif" Width="82" Height="11"
Border="0"></A></TD>
1707:       <TD VALIGN=TOP WIDTH=469 COLSPAN=5 ROWSPAN=2></TD>
1708:     </TR>
1709:     <TR>
1710:       <TD WIDTH=10 HEIGHT=16></TD>
1711:       <TD COLSPAN=3></TD>
1712:     </TR>
1713:     <TR>
1714:       <TD WIDTH=10 HEIGHT=50></TD>
1715:       <TD COLSPAN=3></TD>
1716:       <TD VALIGN=TOP WIDTH=469 COLSPAN=5 ROWSPAN=3></TD>
1717:     </TR>
1718:     <TR>
1719:       <TD WIDTH=10 HEIGHT=30></TD>
1720:       <TD></TD>
1721:       <TD VALIGN=TOP WIDTH=106 COLSPAN=2><INPUT TYPE=Submit
NAME="FormButton1" value="<- Back" ></TD>
1722:     </TR>
1723:     <TR>
1724:       <TD WIDTH=10 HEIGHT=24></TD>
1725:       <TD COLSPAN=2></TD>
1726:       <TD VALIGN=TOP WIDTH=104><INPUT TYPE=Submit
NAME="FormButton2" value="Next ->" ></TD>
1727:     </TR>
1728:     <TR>
1729:       <TD><IMG SRC="media/images/_tx_.gif" Align="left" Width="10"
Height="1" Border="0" VSpace="0" HSpace="0"></TD>
1730:       <TD><IMG SRC="media/images/_tx_.gif" Align="left" Width="16"
Height="1" Border="0" VSpace="0" HSpace="0"></TD>
1731:       <TD><IMG SRC="media/images/_tx_.gif" Align="left" Width="2"
Height="1" Border="0" VSpace="0" HSpace="0"></TD>
1732:       <TD><IMG SRC="media/images/_tx_.gif" Align="left"
Width="104" Height="1" Border="0" VSpace="0" HSpace="0"></TD>
1733:       <TD><IMG SRC="media/images/_tx_.gif" Align="left" Width="4"
Height="1" Border="0" VSpace="0" HSpace="0"></TD>
1734:       <TD><IMG SRC="media/images/_tx_.gif" Align="left" Width="90"
Height="1" Border="0" VSpace="0" HSpace="0"></TD>
1735:       <TD><IMG SRC="media/images/_tx_.gif" Align="left" Width="15"
Height="1" Border="0" VSpace="0" HSpace="0"></TD>
1736:       <TD><IMG SRC="media/images/_tx_.gif" Align="left"
Width="300" Height="1" Border="0" VSpace="0" HSpace="0"></TD>
1737:       <TD><IMG SRC="media/images/_tx_.gif" Align="left" Width="60"
Height="1" Border="0" VSpace="0" HSpace="0"></TD>
1738:     </TR>
1739:   </TABLE>
1740:   <INPUT TYPE="Hidden" NAME="GuestBookRecordset_Action">
1741:   <INPUT TYPE="Hidden" NAME="GuestBookRecordset_Position"
VALUE="'.((GuestBookRecordset.GetState())).'">
1742:   <INPUT TYPE="Hidden" NAME="_Bindings" VALUE="">
1743: </FORM>
1744:
1745: <A NAME="EndOfPage">&nbsp</A>
1746: </BODY></HTML>
1747:
1748: '
1749: );
1750:
1751:
1752: #######################################################
1753: ## End script insert
1754: #######################################################
1755:
1756:   $main::Response->End();
1757: }
1758: 1;



If you can't help yourself, please send mail to [EMAIL PROTECTED] or
[EMAIL PROTECTED] about your problem, including this output.

Reply via email to