A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
good select statement but does not run in java jdbc
Joined: Oct 08, 2009
Mar 10, 2011 21:35:40
I wrote a SQL static class so that I can run as follow
sql="select * from table where name = 'McDonald' "; // (A)
List<Row> list = SQL.query(sql); // (B)
(B) is implemented as follow:
public static List<Row> query(String sql)
Connection con ....
preparedStament = con.getPrepared..
result = preparedStatement.executeQuery(sql);
Say, the sql statement above works in PL/SQL but it does not work in
, even this code was tested for many other sql statement. Is any pit fall that I encounter? Greatly appreciated.
The sql statement in PL/SQL works sucessfully and this code works for other SQL statements, too.
But why for one query
Joined: Nov 24, 2005
Mar 10, 2011 21:41:19
It does not work ? What's the error ?
All roads lead to JavaRanch
I agree. Here's the link:
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: good select statement but does not run in java jdbc
PreparedStatement binding not working properly (Oracle Problem?)
com.thinweb.tds.Driver for Ms SQL 7
OrindaBuild 3.0 - Generates Java to call Oracle SQL Statements and PL/SQL procedures
OrindaBuild Now Supports Oracle 10G and JDeveloper 10G
OrindaBuild 4.0 - Writes Java to access Tables, PL/SQL and SQL Files
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013