I'm using ColdFusion MX and Access 2000. I have a strange error that ocurrs
with CF talking to the Access database using CFTRANSACTION. What I'm doing
is insert a record to the Access table and then get the autonumber value in
the Respondent field. I insert with INSERT (duh) and I get the number with
SELECT max(Respondent). The whole sequence is preceded by a <cfif
IsDefined("FORM.MM_InsertRecord")...> to check for the previous page that
has the form. I'm enclosing both queries (insert and select) within
CFTRANSACTION, so I know there is no other INSERT operation in between my
inserting a record and getting the number.
When I put CFTRANSACTION before the cfif and after the /cfif and save
changes, I don't get any error, but the Access database does not show any
new record. Oddly enough, the autonumber field keeps increasing, and the
SELECT max() command shows an increment in the autonumber too. What's more,
when I go to the table and manually add a record, the autonumber jumps
from, say 6 to 10 (since there were 3 form submissions), but no record 7,
8, or 9 is displayed in the table. When I try to verify the server behavior
INSERT RECORD, I get an error message saying "ReferenceError:
NotFoundMessage is not defined" coming from the
DreamweaverMX/Configuration/Shared/Controls/Scripts/ConnectionTableMenu.js
file.
If I put the CFTRANSACTION after the cfif and right before the /cfif and
save, I get the error "TypeError: the _expression_ has not properties" this
time from
DreamweaverMX/Configuration/ServerModels/ColdFusion/dwscriptsServerImpl.js
The Access database shows the same error as before: autonumber increases,
no records actually shown in the table.
Finally, if I don't use CFTRANSACTION, everything works fine (no errors,
record is displayed), but then I run the risk of an intrusive INSERT
operation between my insert and my getting the number, which could mess up
the data.
Any advice/pointers/possible solutions/alternatives to implement?
Thanks a lot,
Roberto Perez
[EMAIL PROTECTED]
P.S.: I've posted the code as a .txt file at
http://garnet.acns.fsu.edu/~rgp6722/ProcessConsent.txt
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

