Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: sequences, Ole and "invalid table name"

Re: sequences, Ole and "invalid table name"

From: ErikYkema <erik.ykema_at_gmail.com>
Date: Fri, 20 Jul 2007 20:10:30 -0000
Message-ID: <1184962230.112608.42810@o61g2000hsh.googlegroups.com>


On Jul 20, 9:48 pm, codefragm..._at_googlemail.com wrote:
> Hi
> I've got a OleDb connection to oracle over which I can send any
> random SQL commands quite
> happily. The exception seems to be sequence commands.
> If I try this:
>
> select SEQUENCENAME.nextval from dual;
>
> I get "invalid table name" as a response
>
> - If i substitute my own table which has one row for dual, same answer
> - I've had to uninstall 10g and install 9I for various reasons, and
> switch from MSDAORA to OraOLEDB.Oracle, same answer.
> Over this same connection I've sent any number of selects, inserts
> and deletes. I can also take the same string,
> place it in sqlplus and run it and it works perfectly with the same
> sign on credentials.
>
> Any Ideas? Please?
>
> p.s. Any emacs users here? If I use ed <scriptname> can I make that
> script be created in the same place each time, seems to be created in
> the last directory I had a file open. I can probably figure this out
> but if you happen to know...

Just my 2 cents...
OleDB is a MicroSoft design. sequence.nextval is Oracle's. Can the statement parser be assuming that the column nextval is selected from the table or table alias sequence, however there is no table nor table alias in the from clause that is names sequence? If so, one could one be lucky by wrapping the select nextval in a function and selection that from dual?
I got no OleDB here, just a guess. Might help to post a piece of your OleDB actual code, in case someone here can read that. Good luck, Erik Ykema Received on Fri Jul 20 2007 - 15:10:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US