Hi,
I need to connect to Oracle9,10 and 11 in my java application.The client will always be present where the app will be run and I want the app to just work with username,password and instance (specified in tnsnames.ora).Hence I would like oci drivers with a connection string of type : jdbc:oracle:oci:@testora .Im using the driver: ora...
I 'RTFM' and did not find a way to retrieve the columns involved in a unique constraint for a given schema and table.
Somewhere I read that there should be an implicitly created unique index, which backs the unique constraint. Its name is supposed to be equal to the name of the conglomerate that corresponds to the unique constraint.
So...
I'm would like to use Scala to persist data to a relational database, so what I am looking for are examples of CRUD operations using Scala.
I would like to code on a lower level of abstraction than an ORM like Hibernate/Toplink (read:JDBC), but between us, I would like to see examples of all types.
Thanks folks.
...
Hey guys,
I have an MS-Access mdb file that I need to import data from into my mysql instance. I am on a mac, is there any free/OSS tools that allow me to do that? If not, is there a free/OSS JDBC driver that I can use to extract the data I need?
Thanks.
...
Since in log4j javadoc is
WARNING: This version of JDBCAppender is very likely to be completely replaced in the future. Moreoever, it does not log exceptions.
What should I do to log to a database?
...
I'm getting the following error when trying to connect to a Sql Server (2005) using JDBC:
unhandled token type: unknown token: 0x53
Any ideas anyone? I would have liked a more descriptive error too!!
Also, I've done the 'telnet servername 1433' test and can confirm that machine can create a TCP connection.
...
I know in Java, when using PreparedStatement with parameters, some JDBC drivers will optimize the SQL queries by turning them into stored procedures so that all the subsequent calls will run faster. Does SqlCommand provide such optimization when accessing MS SQLServer?
...
I need to call some PL/SQL procedures from my Java application. I can do it with JDBC. But the problem is that procedures are using the "PL/SQL Web Toolkit" and its packages (htp, owa _ util, owa _ cookie, ...). When I call them I get some exceptions as this:
Exception in thread "main" java.sql.SQLException: ORA-06502: PL/SQL: numeric o...
Hi .. I'm a beginner with jdbc ... I have a problem running this code :
This code uses appache derby and in order to make it work I first started the derby server..
java -jar "C:\Program Files\Sun\JavaDB\lib\derbyrun.jar" server start
And then started the program
java -classpath derbyclient.jar -jar TestDB.jar
I se...
Hi all,
I have a problem with JDBC Thin in Oracle 11g with NetBeans V6.7.1. I don't know how to configure it. I have already set classpath of ojdbc6.jar and orai18n.jar. But I still can't run this example in NetBeans:
import java.sql.*;
import oracle.jdbc.*;
import oracle.jdbc.pool.OracleDataSource;
class JDBCVersion
{
public stati...
So i need to run a jdbc call that is going against a sql server database.
CallableStatement cs = conn.prepareCall("{ ? = call " + spName + " ( ?, ?, ?, ?, ? ) }");
So the sql server call is a function that has output parameters.
we are using mysql database and it looks like mysql functions don't support functions with out put param...
I'm trying to propagate the schema from the Hibernate configuration to the RDBMS. The code runs without any error message but the database doesn't get updated.
Any hints ? Thank you !
Update That is hibernate-core only with a HSQL database.
Update 2 Yes, i should use SchemaExport (i'm away from hibernate a while ),but it don't flush ...
Is it possible to specify connection/query timeout for the Oracle database queries? Either on Oracle side or in Oracle's JDBC driver (10.2.0.4)? So, that Java client just got an error back after, let's say, 2 minutes instead of waiting until Oracle finishes executing the query?
...
What is the simplest (preferably without any new table creation) way of running a database query which takes long time (at least several minutes) in Oracle DB?
...
Hi I have created jdbc program and database is MySQL 5.1
Also all my friends using same database for connection. Total number of connection became 150 from all of us.
So when i want to connect more then i got the following error
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database...
I am writing a module that will be used in different applications (2-tiers and 3-tiers).
I'll need to connect to a DB. so, I made the module requires a java.sql.Connection object as a parameter when used with a 2-tier application. there's no problem there.
the problem i'm facing is that in case of a 3-tier application, the module will b...
I want to first get some result set (that includes two joins and selection), and then get the maximum value for one of the columns in the result set.
I need both the data in the original results set, and the max.
Is this possible with JDBC, and how?
...
I am creating a sybase stored prodedure that is being called through JDBC. Under certain error conditions i want my stored procedure to return a warning to the JDBC caller. What do i need to add to the stored procedure so
Statement.getWarnings()
returns a SqlWarning that contains an error message of my choice?
...
I am processing a large amount of data in a Spring JDBC DAO. The DAO directly returns an Iterator over the objects which operates on a bounded BlockingQueue using take() while the retrieval operation is happening in a separate thread (using an ExecutorService).
Inside this thread I see the following behaviour: the retrieval works but ce...
SQLException.getSQLState retrieves the SQLState for the SQLException object. What are all the possible values that can be returned by this method? Can I use the value to identify specific errors that ocured in the database (i.e. can this value tell me if it was a PK violation, or a unique constraint, or column value to large etc)?
Also,...