dbTalk Databases Forums  

Invalid character???

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Invalid character??? in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tim Slattery
 
Posts: n/a

Default Invalid character??? - 08-18-2008 , 03:23 PM






I'm at a total impasse. I have a stored function that returns a
SYS_REFCURSOR. It works fine, I can call it in SQL*Plus and see the
data that's been extracted. I'm trying to call it from Java:

String spName;
try
{
getDBConnection(); /* sets "dbConnection */

spName = "{ call ? := getReporterData(?) }";

sprocStmt = dbConnection.prepareCall(spName);
sprocStmt.registerOutParameter(1, OracleTypes.CURSOR);
sprocStmt.setString(2, key);
sprocStmt.execute();

And I get ORA-00911 Invalid character. What invalid character?

--
Tim Slattery
Slattery_T (AT) bls (DOT) gov
http://members.cox.net/slatteryt

Reply With Quote
  #2  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: Invalid character??? - 08-18-2008 , 05:40 PM






Tim Slattery (Slattery_T (AT) bls (DOT) gov) wrote:
: I'm at a total impasse. I have a stored function that returns a
: SYS_REFCURSOR. It works fine, I can call it in SQL*Plus and see the
: data that's been extracted. I'm trying to call it from Java:

: String spName;
: try
: {
: getDBConnection(); /* sets "dbConnection */
:
: spName = "{ call ? := getReporterData(?) }";
:
: sprocStmt = dbConnection.prepareCall(spName);
: sprocStmt.registerOutParameter(1, OracleTypes.CURSOR);
: sprocStmt.setString(2, key);
: sprocStmt.execute();

: And I get ORA-00911 Invalid character. What invalid character?

What are the { } braces for in the SQL statement ?


Reply With Quote
  #3  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: Invalid character??? - 08-18-2008 , 05:40 PM



Tim Slattery (Slattery_T (AT) bls (DOT) gov) wrote:
: I'm at a total impasse. I have a stored function that returns a
: SYS_REFCURSOR. It works fine, I can call it in SQL*Plus and see the
: data that's been extracted. I'm trying to call it from Java:

: String spName;
: try
: {
: getDBConnection(); /* sets "dbConnection */
:
: spName = "{ call ? := getReporterData(?) }";
:
: sprocStmt = dbConnection.prepareCall(spName);
: sprocStmt.registerOutParameter(1, OracleTypes.CURSOR);
: sprocStmt.setString(2, key);
: sprocStmt.execute();

: And I get ORA-00911 Invalid character. What invalid character?

What are the { } braces for in the SQL statement ?


Reply With Quote
  #4  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: Invalid character??? - 08-18-2008 , 05:40 PM



Tim Slattery (Slattery_T (AT) bls (DOT) gov) wrote:
: I'm at a total impasse. I have a stored function that returns a
: SYS_REFCURSOR. It works fine, I can call it in SQL*Plus and see the
: data that's been extracted. I'm trying to call it from Java:

: String spName;
: try
: {
: getDBConnection(); /* sets "dbConnection */
:
: spName = "{ call ? := getReporterData(?) }";
:
: sprocStmt = dbConnection.prepareCall(spName);
: sprocStmt.registerOutParameter(1, OracleTypes.CURSOR);
: sprocStmt.setString(2, key);
: sprocStmt.execute();

: And I get ORA-00911 Invalid character. What invalid character?

What are the { } braces for in the SQL statement ?


Reply With Quote
  #5  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: Invalid character??? - 08-18-2008 , 05:40 PM



Tim Slattery (Slattery_T (AT) bls (DOT) gov) wrote:
: I'm at a total impasse. I have a stored function that returns a
: SYS_REFCURSOR. It works fine, I can call it in SQL*Plus and see the
: data that's been extracted. I'm trying to call it from Java:

: String spName;
: try
: {
: getDBConnection(); /* sets "dbConnection */
:
: spName = "{ call ? := getReporterData(?) }";
:
: sprocStmt = dbConnection.prepareCall(spName);
: sprocStmt.registerOutParameter(1, OracleTypes.CURSOR);
: sprocStmt.setString(2, key);
: sprocStmt.execute();

: And I get ORA-00911 Invalid character. What invalid character?

What are the { } braces for in the SQL statement ?


Reply With Quote
  #6  
Old   
Vladimir M. Zakharychev
 
Posts: n/a

Default Re: Invalid character??? - 08-19-2008 , 08:01 AM



On Aug 19, 12:23*am, Tim Slattery <Slatter... (AT) bls (DOT) gov> wrote:
Quote:
I'm at a total impasse. I have a stored function that returns a
SYS_REFCURSOR. It works fine, I can call it in SQL*Plus and see the
data that's been extracted. I'm trying to call it from Java:

* * * *String spName;
* * * *try
* * * *{
* * * * * *getDBConnection(); * * * */* sets "dbConnection */

* * * * * *spName = "{ call ? := getReporterData(?) }";

* * * * * *sprocStmt = dbConnection.prepareCall(spName);
* * * * * *sprocStmt.registerOutParameter(1, OracleTypes.CURSOR);
sprocStmt.setString(2, key);
* * * * * *sprocStmt.execute();

And I get ORA-00911 Invalid character. What invalid character?

--
Tim Slattery
Slatter... (AT) bls (DOT) govhttp://members.cox.net/slatteryt
Shouldn't this be spName = "{ ?= call getReporterData(?) }"; ? At
least if you're using JDBC escape syntax... Otherwise it can be spName
= "BEGIN ? := getReporterData(?); END;", in this case it'll be Oracle-
specific.

Hth,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com


Reply With Quote
  #7  
Old   
Vladimir M. Zakharychev
 
Posts: n/a

Default Re: Invalid character??? - 08-19-2008 , 08:01 AM



On Aug 19, 12:23*am, Tim Slattery <Slatter... (AT) bls (DOT) gov> wrote:
Quote:
I'm at a total impasse. I have a stored function that returns a
SYS_REFCURSOR. It works fine, I can call it in SQL*Plus and see the
data that's been extracted. I'm trying to call it from Java:

* * * *String spName;
* * * *try
* * * *{
* * * * * *getDBConnection(); * * * */* sets "dbConnection */

* * * * * *spName = "{ call ? := getReporterData(?) }";

* * * * * *sprocStmt = dbConnection.prepareCall(spName);
* * * * * *sprocStmt.registerOutParameter(1, OracleTypes.CURSOR);
sprocStmt.setString(2, key);
* * * * * *sprocStmt.execute();

And I get ORA-00911 Invalid character. What invalid character?

--
Tim Slattery
Slatter... (AT) bls (DOT) govhttp://members.cox.net/slatteryt
Shouldn't this be spName = "{ ?= call getReporterData(?) }"; ? At
least if you're using JDBC escape syntax... Otherwise it can be spName
= "BEGIN ? := getReporterData(?); END;", in this case it'll be Oracle-
specific.

Hth,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com


Reply With Quote
  #8  
Old   
Vladimir M. Zakharychev
 
Posts: n/a

Default Re: Invalid character??? - 08-19-2008 , 08:01 AM



On Aug 19, 12:23*am, Tim Slattery <Slatter... (AT) bls (DOT) gov> wrote:
Quote:
I'm at a total impasse. I have a stored function that returns a
SYS_REFCURSOR. It works fine, I can call it in SQL*Plus and see the
data that's been extracted. I'm trying to call it from Java:

* * * *String spName;
* * * *try
* * * *{
* * * * * *getDBConnection(); * * * */* sets "dbConnection */

* * * * * *spName = "{ call ? := getReporterData(?) }";

* * * * * *sprocStmt = dbConnection.prepareCall(spName);
* * * * * *sprocStmt.registerOutParameter(1, OracleTypes.CURSOR);
sprocStmt.setString(2, key);
* * * * * *sprocStmt.execute();

And I get ORA-00911 Invalid character. What invalid character?

--
Tim Slattery
Slatter... (AT) bls (DOT) govhttp://members.cox.net/slatteryt
Shouldn't this be spName = "{ ?= call getReporterData(?) }"; ? At
least if you're using JDBC escape syntax... Otherwise it can be spName
= "BEGIN ? := getReporterData(?); END;", in this case it'll be Oracle-
specific.

Hth,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com


Reply With Quote
  #9  
Old   
Vladimir M. Zakharychev
 
Posts: n/a

Default Re: Invalid character??? - 08-19-2008 , 08:01 AM



On Aug 19, 12:23*am, Tim Slattery <Slatter... (AT) bls (DOT) gov> wrote:
Quote:
I'm at a total impasse. I have a stored function that returns a
SYS_REFCURSOR. It works fine, I can call it in SQL*Plus and see the
data that's been extracted. I'm trying to call it from Java:

* * * *String spName;
* * * *try
* * * *{
* * * * * *getDBConnection(); * * * */* sets "dbConnection */

* * * * * *spName = "{ call ? := getReporterData(?) }";

* * * * * *sprocStmt = dbConnection.prepareCall(spName);
* * * * * *sprocStmt.registerOutParameter(1, OracleTypes.CURSOR);
sprocStmt.setString(2, key);
* * * * * *sprocStmt.execute();

And I get ORA-00911 Invalid character. What invalid character?

--
Tim Slattery
Slatter... (AT) bls (DOT) govhttp://members.cox.net/slatteryt
Shouldn't this be spName = "{ ?= call getReporterData(?) }"; ? At
least if you're using JDBC escape syntax... Otherwise it can be spName
= "BEGIN ? := getReporterData(?); END;", in this case it'll be Oracle-
specific.

Hth,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com


Reply With Quote
  #10  
Old   
Tim Slattery
 
Posts: n/a

Default Re: Invalid character??? - 08-19-2008 , 08:11 AM



yf110 (AT) vtn1 (DOT) victoria.tc.ca (Malcolm Dew-Jones) wrote:

Quote:
Tim Slattery (Slattery_T (AT) bls (DOT) gov) wrote:
: I'm at a total impasse. I have a stored function that returns a
: SYS_REFCURSOR. It works fine, I can call it in SQL*Plus and see the
: data that's been extracted. I'm trying to call it from Java:

: String spName;
: try
: {
: getDBConnection(); /* sets "dbConnection */
:
: spName = "{ call ? := getReporterData(?) }";
:
: sprocStmt = dbConnection.prepareCall(spName);
: sprocStmt.registerOutParameter(1, OracleTypes.CURSOR);
: sprocStmt.setString(2, key);
: sprocStmt.execute();

: And I get ORA-00911 Invalid character. What invalid character?

What are the { } braces for in the SQL statement ?
That's JDBC syntax, it's not the problem.

<Sigh>....the java folks thought maybe the colon before the equal sign
was the problem. That's not it either.

--
Tim Slattery
Slattery_T (AT) bls (DOT) gov
http://members.cox.net/slatteryt


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.