Results 1 to 8 of 8
Thread: SQL Error
- 07-06-2010, 10:06 PM #1
SQL Error
Seems basic, but I keep getting Invalid Character
Java Code:Connection con = Utility.getOracleConnection(); String SQL = "SELECT ORDERED FROM AGG_SLR_SUMMARY;"; Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY); ResultSet rs = stmt.executeQuery(SQL);
Error:
If I change this statement without the ;Java Code:16:38:28,010 INFO [STDOUT] SQLException() - ORA-00911: invalid character 16:38:28,010 INFO [STDOUT] java.sql.SQLSyntaxErrorException: ORA-00911: invalid character
I get the errorJava Code:String SQL = "SELECT ORDERED FROM AGG_SLR_SUMMARY";
I've connected to this database before with a CallableStatement for a package.procedure...Java Code:16:28:51,807 INFO [STDOUT] SQLException() - ORA-00942: table or view does not exist 16:28:51,807 INFO [STDOUT] java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
Am I missing something here?:rolleyes: ~ Sno ~ :rolleyes:
'-~ B.S. Computer Science ~-'
- 07-06-2010, 10:21 PM #2
String SQL = "SELECT ORDERED FROM AGG_SLR_SUMMARY;";
That semicolon inside the sql String seems very suspicious.
Did you forget an owner/ schema name?Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 07-06-2010, 10:46 PM #3
owner/ schema name which you reference is in the Utility.getOracleConnection(); method that I call.
I am not at work anyone, which I was doing this, looking back at my personal project code. This worked for me in the past
i'll try that tomorrow, and I have played with that semi-colon, it was suspicious to me as well.Java Code://PHPmyAdmin Database Statement st = conn.createStatement(); ResultSet res = st.executeQuery("SELECT * FROM `eossysdef`;"); // SQL Grab Table:rolleyes: ~ Sno ~ :rolleyes:
'-~ B.S. Computer Science ~-'
- 07-07-2010, 09:08 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
The PHPMyAdmin driver is probably quite lenient.
The semi-colon isn't needed.
Anyway, "table or view doesn't exist" is pretty clear.
Ensure you are looking at the correct db.
Ensure that db has that table.
Is that table part of the user schema you are logged in as?
If not then I'd recommend, as already suggested, adding the schema name in the query.
- 07-07-2010, 01:40 PM #5
... I think I found my problem. Yesterday morning before I dropped an xml file named oracle-ds.xml that held my QA database info. I ended up overwriting my development database info.
So I'm about to determine if that was the actual issue.:rolleyes: ~ Sno ~ :rolleyes:
'-~ B.S. Computer Science ~-'
- 07-07-2010, 03:16 PM #6
Yup. It was exactly the overwrite I perform yesterday.
:rolleyes: ~ Sno ~ :rolleyes:
'-~ B.S. Computer Science ~-'
- 07-07-2010, 03:23 PM #7
Solved?:rolleyes:
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 07-07-2010, 04:02 PM #8
Similar Threads
-
java out of memory error-heap space error
By elsanthosh in forum NetBeansReplies: 4Last Post: 06-15-2010, 09:31 AM -
> Operator cannot be applied error and return incompatible types error
By corney_16 in forum New To JavaReplies: 1Last Post: 03-10-2010, 01:53 PM -
Thread: Error 500--Internal Server Error java.lang.NullPointerException
By jackdear44 in forum New To JavaReplies: 1Last Post: 12-05-2009, 07:28 AM -
java.lang.Error: Error opening DSound for capture
By NARs in forum NetworkingReplies: 1Last Post: 10-26-2009, 04:38 PM -
Diference Between compiler error Garbage collection and Runtime Error?
By makpandian in forum New To JavaReplies: 3Last Post: 01-23-2009, 08:53 AM


LinkBack URL
About LinkBacks

Bookmarks