Closed Thread Icon

Topic awaiting preservation: oracle error 933 (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=22398" title="Pages that link to Topic awaiting preservation: oracle error 933 (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: oracle error 933 <span class="small">(Page 1 of 1)</span>\

 
mobrul
Bipolar (III) Inmate

From:
Insane since: Aug 2000

posted posted 07-02-2004 00:02

I'm trying to update a table (w/ PHP) and am getting error 933 - SQL command not properly ended, but I can't figure out why.
I'm sure I'm just not seeing something totally simple, but I have been staring and searching for an hour and I can't figure it out.
SQL:

UPDATE IS_MEETING_MSTR SET IS_MTG_NM = 'Conference 2004', IS_MTG_START_DT = '08-SEP-04', IS_MTG_END_DT = '15-SEP-04', IS_MTG_FEE = 325, IS_MTG_DESC = 'Member Conference 2004 will be held downtown.', IS_MTG_COMMENTS = 'For more information please contact Sally.', IS_MTG_FINAL_DETAILS = '' WHERE IS_MTG_ID = 3

IS_MTG_FEE and IS_MTG_ID are both numbers.
IS_MTG_START_DT and IS_MTG_END_DT are both dates.
Everything else are varchars.

I simply can't see what I'm doing wrong.

Any help?

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 07-02-2004 01:32

How about something like ';' at the end of the query?

Pulling at strings here because everything else looks fine.

Dan @ Code Town

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 07-02-2004 01:39

/me pulls some other strings.

Is there any constraints on the IS_MEETING_MST table ? on the foreign keys, if there's any in that table. Or for instance, one that would forbid certain values like '' ?

But adding a semicolon seems to be a good beginning.

mobrul
Bipolar (III) Inmate

From:
Insane since: Aug 2000

posted posted 07-02-2004 17:02

it's not the ';'.
This sql is in a variable ($sql) and then that variable is passed into the various appropriate oci functions.
Just to be sure, though, I added the semi-colon and error again.

no constraints (as far as I know). I haven't had any other problems and the db admin says no.

I'm pulling out what little hair I have left.

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 07-02-2004 18:27

I can't see anything wrong either.

Here's how I'd debug. First wrap even the numbers in quotes. Then start removing the various different value upates one at a time to see if one in particular is causing a problem.

Then I'd start pulling out my hair.



.:[ Never resist a perfect moment ]:.

mobrul
Bipolar (III) Inmate

From:
Insane since: Aug 2000

posted posted 07-02-2004 19:19

I figured it out!

The sql is passed through a function which, among other things, replaces people's names with a mailto: link.
So:
SQL was not what I thought it was, but was instead:
(only including the relevant parts)
...IS_MTG_COMMENTS = 'For more information please contact <a href=\'mailto:sally.engel@coname.com\'>Sally</a>.', IS_MTG_FINAL_DETAILS = ...

For some reason I don't understand, the \'> caused trouble.
When I reworked the href to use double quotes instead of single quotes, everything worked out ok.

Now, it's working, so I'm no longer pulling out me hair, but I kinda want to know why the \'> threw an error but "> did not?

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 07-03-2004 16:08

because the string is quoted with ' and oracle does not escape via \, I'd assume.

« BackwardsOnwards »

Show Forum Drop Down Menu