Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Populating 10G XE table with time AND date through VB.Net
In message <bka522d9poqml738484ehodta4dinhhujs_at_4ax.com>, Dave Baker
<newsgroup_poster_at_jodael.com> writes
Other people have answered your main problem.
>So, I try to change it in VB.Net with the following command from within
>VB.Net:
>
> alter session set NLS_TIMESTAMP_FORMAT = 'DD-MON-RR HH.MI.SS';
>
>(This is done within a VB.Net OracleCommand, and I copied & pasted the exact
>SQL string sent above). However, I get an error
> ORA-00911: invalid character
>
>If I run exactly same statement from within Oracle GUI SQL window I get:
> Statement processed.
> 0.12 seconds
>
>So, does anyone know why I would get that error from within VB.Net with
>exactly the same string working fine through the GUI?
Plain SQL statements in Oracle don't have trailing semi-colon. In SQL*Plus and compatible tools, the semi-colon is used to run the command. It is not required in the XE GUI, but is supported for compatibility with SQL*Plus.
When submitting SQL statements directly to the database through odp.net or jdbc the semi-colon is not required, and in fact is an illegal character.
PL/SQL statements can (and must) contain semi-colons.
-- Jim Smith I'm afraid you've mistaken me for someone who gives a damn.Received on Sat Mar 25 2006 - 02:18:12 CST