[ic] "touching" a database causes [import] to stop working

Mike Heins mikeh@minivend.com
Fri, 22 Sep 2000 14:42:36 -0400


Quoting Chris Wenham (cwenham@netmonger.net):
> 
>  I've isolated a problem that's happening whenever I want to use the
>  [import] tag to add a record to a database.
> 
>  If I use [perl tables="whatever"] or [data whatever column key] in
>  the same page, then the [import] tag fails to work. As soon as I
>  comment out the [data] tag (or remove the table from the perl tag),
>  the [import] works again.
> 
>  What I'm doing in the page that performs the [import] is to check for
>  duplicate records before inserting. This means doing a lookup on the
>  proposed key to make sure there isn't already a record with the same
>  key. The act of "touching" the database this way appears to make the
>  [import] tag impotent.
> 
>  Is Interchange/minivend locking the table? 

Yes.

You need to do a [flag type=write table=whatever] before you 
do the [perl tables="whatever"]. Once the table is opened read-only,
there is no going back.

If you look for WRITE_CONTROL you can set it to always, but that
is a bit dangerous.

-- 
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.8220 fax 7501 <heins@akopia.com>

Few blame themselves until they have exhausted all other possibilities.
 -- anonymous