Hi Everyone
I just want to know your opinion.
I have here a situation. I have a almost release ready (release in 2 month) application that runs queries on the microsoft Sql-Server database.We use the standard Microsoft jdbc driver implementation for sql-server. Works great,no problems.
Now there come a developer to me and says that i ...
Hi Guys,
Can anybody tellme how to pass Java Object as a parameter to Oracle stored procedure.
After passing it into procedure, can you also tell me how to convert the same Java object into Oracle type in procedure, I mean how to retrive the data in Java Object.
Thanks and Regards
Ratna
...
I'm using in-memory derby db for my java application. I would like to delete all the tables/databases it created once the application ends. So when it starts back up, I want it to start fresh.
...
Hello,
I've got a problem with JDBC.
I'have the following code:
//blargeparam is a blob column.
PreparedStatement pst =connection.prepareStatement("update gcp_processparams_log set blargeparam= ? where idprocessparamslog=1");
pst.setBinaryStream(1,inputStream);
I get the following error:
Exception in thread "main" java.lang.Abstra...
I'm using a prepared statment that should (using SQL & JDBC) insert data into a dataTable. I am using one that deletes data that works fine, but the insert one is not inserting any data into the data table and does not produce an error or warning. What could cause a prepared statement to fail in this way?
Could inserting a null value int...
I am getting this error when trying to insert data into a data table
Error Saving data. [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect
I looked at the appropriate data table and there does not exist a field called COUNT either hidden or not hidden. Is this some SQL terminology that I should be familiar with?
An Extens...
Hi friend I am using MySQL as my database and java as frontend. I am using stored procedure if I want to retrieve the data.
There is no synchronization concept.
If I want to get the same result from database i am calling the same stored procedure passed the same value.
So I got the result.
But If I do it multiple times in fraction of s...
Hello
I have a Java JDBC application that uses multiple threads to retrieve information from an Oracle data base. Each thread si supposed to periodically execute a statement that executes a select on a specific table (the table is different for each row).
The threads are instances of a class that extends the Thread class. This class ha...
I recently switched to Spring Framework instead of manually handling JDBC, and it is mostly a good transition. One program started having strange problems, though: if the database is slow, when calling getJdbcTemplate().update( ... ) it sometimes never returns.
After researching a little bit, I switched from Apache DBCP to C3PO, but the...
Currently we use jtds for connecting to our SQL Server databases. I've always taken it for granted that we use it due to performance and reliability reasons, however, it's usage pre-dates my employment.
All of that being said, we are now playing with the idea of moving to SQL Server 2008, which jtds has limited support for. Initial tes...
I just inserted 1million records into a simple sqlite table with five columns. It took a whooping 18 hours in java using the jdbc drivers! I did the same thing in python2.5 and it took less than a minute. The speed for select queries seem fine. I think this is an issue with the jdbc drivers.
Is there a faster driver for sqlite3 in jav...
The Spring Framework has two similar classes: JdbcTemplate is the old, Java 1.4 class, and SimpleJdbcTemplate is newer, with nicer methods.
JdbcTemplate has a method setQueryTimeout, which basically gives me access to a method with the same name on the underlying Statement object.
Is there any way to do something similar with a SimpleJ...
Is the standard MySQL JDBC driver thread-safe? Specifically I want to use a single connection across all threads, but each statement will only be used in a single thread. Are there certain scenarios that are safe and others that aren't? What's your experience here?
...
I have this method to insert data using jdbc that will insert the value according to the java type. Something like this:
Object o = map.get( key );
if( o == null ) {
// setNull( index );
} else if( o instanceof String ) {
// setString( index, (String) o );
} else if( o instanceof Timestamp ) {
// setTimestampt( index, ( Ti...
I been working the whole week to troubleshot a production error.
I have eventually got the the point where I can find the culprit record which is causing all the mess.
I've got the following error message:
java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-01438: value larger than specified precision allows for this column
...
Hi all
I have a program that needs to query a database in a given interval and with the records it gets call perform some action, then update the table again.
I am using the ExecutorService to run the threads, but am wondering, should each thread get its own connection (because it needs to update database) or can I use the same connect...
Taking a peak into the 'information_schema' database and peaking at the metadata for one of my pet projects, I'm having a hard time understanding what (if any) differences there are between the 'create schema' command and the 'create database' command for MySQL.
Are there any differences? If not, is this a rather typical pattern of beha...
Hi,
I have trying to check whether connection is valid or not and using isValid() method of java.sql.Connection. But this method doesn't return and hangs.
Is there anything I am missing or this method requires any configuration? Using mysql-connector-java-5.0.7-bin.jar
Thanks,
Shahid
...
I'm using Glassfish and Toplink together with an MS-SQL-Server, thus sqljdbc4.jar is used for connecting to the database. When the database is not available (DB server is down), the CPU usage rises to 100% and Glassfish keeps on trying to connect forever. My log fills up rapidly with the following messages:
FINE: TDSChannel (ConnectionI...
import java .sql.*;
class Pro
{
public static void main(String args[]) throws Exception
{
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost:3306/test";
Connection conn = DriverManager.getConnection (url,"root","password");
CallableStatement cst=conn.prepareCall("{call fileproc(?,?)}");
cst.setInt(1,10);
cst.reg...