When I search the web for inserting BLOBs into Oracle database with jdbc thin driver, most of the webpages suggest a 3-step approach:
insert empty_blob() value.
select the row with for update.
insert the real value.
This works fine for me, here is an example:
Connection oracleConnection = ...
byte[] testArray = ...
PreparedStateme...
Hi! I just migrating one of our applications from pure JDBC to Spring's JDBCTemplate. I was wondering how to create a write lock for a table. Do i just execute a "LOCK TABLE foo" Query or is there a generalisized way for doing this in JDBCTemplate?
Thanks!
...
Resultset has no method for hasNext. I want to check if the resultSet has any value
is this the correct way
if (!resultSet.next() ) {
System.out.println("no data");
}
...
I need to replicate data from Microsoft SQL Server to MySQL or PostgreSQL. The data includes images stored in BLOB columns.
Could you please comment on your experiences with the following strategies and suggest others I may have missing?
custom script written in Java using JDBC
linux odbc driver with perl script
Setup my own windows ...
Dear All,
I'm facing a problem in Crystal Report with Eclipse.
I am using a servlet to render the crystal report viewer by writing the viewer object to the response like:
public class ReportViewer extends HttpServlet {
@SuppressWarnings("deprecation")
public void doGet(HttpServletRequest request, HttpServletResponse response)
...
does statement object contain the session id the database returns for the current session? What does a resultset
contain?
...
What is the Python equivalent to DatabaseMetaData
...
Dear All,
I want to mock a ResultSet. Seriously.
I'm refactoring one big complicated piece of code which is parsing data from ResultSet, and I want my code to behave identically. So, I need to write a unit test for the piece being refactored to be able to test this.
After googling I came up with 2 ideas:
Use EasyMock, write looooong ...
I have an application running Quartz 1.6.1 w/persistent job store, with MySQL 5.1 as the DB. This application used to boot up okay in Tomcat6. At some point, it began throwing the following exception upon EVERY boot:
- MisfireHandler: Error handling misfires: Failure obtaining db row lock: Lock wait timeout exceeded; try restarting tran...
Hello,
I am working with JDBC and MySQL. I have a date column that I need included in my result set. Unfortunately, I cannot find a class in Java to retrieve the date. The SQL Date class is deprecated. How do you get Date objects from a result set?
...
hi all,
In our project we are using postgresSql(8.3) as the database server, but we are rarely facing
problem (once a while) . in the log file i am seeing error Like
****Connection attempt failed****
it means for me that , application is attempting to get connection object from the DB server
but it was unsuccessfull.
Strange t...
I want to create a java program for connection with mysql database
I want to use stored procedure with 1 out parameter and 1 in parameter
How to retrieve result using java
Is there any working example?
Thanks,
Deepak
...
Hi,
I’ve been experiencing a performance problem with deleting blobs in derby, and was wondering if anyone could offer any advice.
This is primarily with 10.4.2.0 under windows and solaris, although I’ve also tested with the new 10.5.1.1 release candidate (as it has many lob changes), but this makes no significant difference.
The prob...
Anyone knows how to do hibernate mapping for table or view without a primary key?
thanks.
...
Is there a way to extract timezone information directly from an oracle.sql.TIMESTAMPTZ object (selected from a TIMESTAMP WITH TIME ZONE column)?
Ideally, I'd like to be able to pull the time zone information directly out of the object without jumping through potentially expensive or fragile hoops (like converting things into strings and...
I have java.sql.Statement with lots of batch statements added with addBatch. Executing executeBatch will throw BatchUpdateException after first statement which violates database constrains and won't execute all remaining statements in batch. Is there any way I can execute all statements in batch ignoring erroneous ones?
...
Hello everybody.
I am trying to use JDBC and my query is working in some cases but not working in others.
I would really appreciate any help.
Some of my code:
public Result getSpecificTopic()
{
String query = "Select msg_body, msg_author from lawers_topic_msg";// where msg_id=2 order by msg_id desc";
try
{
...
I have the need to extract result of the database query in XML format. I have planned to use JDBC as my programming language. I came across the XML publishing function of IDS 11.0 and planned to use that. Have configured the database settings to perform XML publishing and am able to execute a query in command prompt (dbaccess databasenam...
Do you know of any good guides on how to access an Access database using Java?
I know the basics and basic SQL, but I'm thinking more about access control.
...
I have a simple web service that uses an oracle database. When I test the service internally it works fine, however, calling the web service through my client (on the same machine but in a different WAR) throws an invocationtargetexception. I've finally discovered it's an issue with instantiating the OracleDriver. It doesn't throw any...