Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!postnews.google.com!i42g2000cwa.googlegroups.com!not-for-mail
From: erich.keane@verizon.net
Newsgroups: comp.databases.oracle.server
Subject: Connecting with C#, trying to use 'RETURNING'
Date: 10 Oct 2006 06:25:21 -0700
Organization: http://groups.google.com
Lines: 18
Message-ID: <1160486721.462133.141550@i42g2000cwa.googlegroups.com>
NNTP-Posting-Host: 69.26.100.251
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1160486726 32082 127.0.0.1 (10 Oct 2006 13:25:26 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 10 Oct 2006 13:25:26 +0000 (UTC)
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: i42g2000cwa.googlegroups.com; posting-host=69.26.100.251;
   posting-account=P2CCAAwAAABGJedltBen0gb8sb7kaiY_
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.server:276917

Ok, so I am attempting to retrieve a generated Primary Key from a
query.  Unfortunately, I am having a heck of a time getting the query
to run.

The below is an example query, used mostly just to test the syntax:
INSERT INTO "SYSTEM"."DEPT" ("DEPTNO","DNAME","LOC") VALUES ((SELECT
nvl(MAX("DEPTNO"),1-1)+1 ),:DNameCol,:LOCCol) returning "DEPTNO"  into
:DEPTNOCol

The parameter :DEPTNOCol is set in C# (using Oracle.DataAccess) as an
output parameter, but I still get the error: ORA-00923: FROM keyword
not found where expected

This site implies that I am doing it correctly, but I really am quite
stuck: http://www.remote-dba.cc/10g_65.htm

Any ideas/help would be grately appreciated.

