From: "daniel kessler"

>The other two you are correct on. However, if you're getting the
>insufficient privs error, I would say that you got the general info
correct.
>Let's take CF out of the picture for a moment. In your Oracle account (via
>sqlplus or Toad or whatever tool you use), log in as the user that owns the
>table you're going to update.
>Run the trigger script.

>I don't have access to the GUI tools here at the college.  Our IT has told
my partner here that they're >insecure so off-limits.  Really doesn't help,
since I'm a DB novice.

FWIW, SQL Plus is hardly a gui. It's the standard Oracle client tool. I
would assume that you have something other than a production account on
which to build this stuff, and I'm pretty surprised that you can't at least
have access to sql plus.

>Nonetheless, I got the command to make the trigger work using your original
code, which was easy once >I realized there was no 'user'.  It told me that
it executed.  I did:

What's "it" in the "It told me that it executed." statement? The error
you're recieving means that the trigger has not been compiled correctly.
It's compiled, but invalid. Whatever tool you're using should be able to
tell you that.

You should also be able to run this query:
select * from user_triggers

It will show you the name of any triggers you have access to and their
status.

>btw, it didn't like the "BEFORE INSERT OR UPDATE".  I had to delete the OR
UPDATE, so I guess >I shouldn't have included the "IF UPDATE" part.  oh
well, no real harm.

If you're not going to use the for update part, I'd go with Jochem's
simplified version of the trigger.

>Also, in the INSERT, I fill in an entry for ID, which is also being filled
by the trigger.  I just figured that >the trigger would toss it.  True?  The
insert looks like:

Yes, it should ignore the passed in value. But, you should alter your code
so as to not pass in a value.

However, if you want to make your life much much easier, and you know that
CF is the only user writing to this table, you can just use this syntax and
drop the trigger entirely. (This has the same effect of adding the next
number in the sequence, but only affects this particular query.)

INSERT INTO HHP_CALENDAR
     (id,header,http,description,dateAdded,event_date,image)
     VALUES
(uniqueNum_s.NEXTVAL,'#Form.header#','#Form.http#','#Form.description#',#the
_date#,#the_event_date#,'#Form.image#')

(Side note: You should get in the habit of using cfqueryparams.)
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to