HP3000-L Archives

April 1999, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Chris Dunlop <[log in to unmask]>
Reply To:
Chris Dunlop <[log in to unmask]>
Date:
Tue, 20 Apr 1999 12:26:53 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (62 lines)
Can anyone offer advice on controlling locking of Image
datasets when using Minoft's ODBC/32 with Active Server Pages and
Active Data Objects?

A few months ago I developed a read-only web-based application
using this setup*, which has been stable and given
satisfactory performance, so now I'm attempting to move on and
develop a read/write application.

I've had success using the SQL UPDATE command to update data.
The area giving me problems, though, is in locking an Image
dataset around a transaction.  At the very least I'd like to
be able to do the following:

Lock table
  Read record and display to user.
  Accept updated field values from user
  Update record
Unlock table.

Much better would be

Read record.
Store field values.
Display record to user.
Accept updated field values from user.
Lock table (if possible at the row level)
  Reread record.
  Compare record field values with original field values to
  check that it hasn't been modified by another user (issue
  error and back out if so).
  Update record
Unlock table

At the moment I've had no sucess in getting ODBC/32 to
lock the database at any point other than the update
itself (which it clearly must be doing, since I'm opening
the database in Image Mode 1). I've tried using various
locking options with the Open method of the ADO Recordset
object (adLockPessimistic, adLockOptimistic and even
adLockReadOnly), but these don't seem to have any affect
whatsoever.  I've also tried to use the SQL command LOCK
TABLE, but always get an error message with this (though
perhaps I don't have the correct syntax - should this
command work?).

Any advice would be greatfully recieved.

* Further information:

HP3000 928 with MPE/iX 5.5
ODBC/32  version 2.1.1
Windows NT 4.0 (live application is on NT Server, but
development platform which I'm currently using is NT Workstation)
Microsoft Internet Information Server with ASP 2.0

--
---------------------------------------------
Chris Dunlop - Management Information Systems
University of East Anglia, Norwich NR4 7TJ
[log in to unmask]

ATOM RSS1 RSS2