Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: sequences, Ole and "invalid table name"
On Jul 20, 10:10 pm, ErikYkema <erik.yk..._at_gmail.com> wrote:
> 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
I found it an intriguing problem, couldn't stop it, also see
http://technet.microsoft.com/en-us/library/ms188427.aspx and
http://www.dbforums.com/archive/index.php/t-344175.html about the
OpenQuery pass-trough option. Let us know whether this helps.
Erik
Received on Fri Jul 20 2007 - 15:19:23 CDT
![]() |
![]() |