Hello
Can anyone list the requirements (i.e. any books, tutorials, libraries etc) to build an application in Java, which could communicate with my MySQL Database which is running on web.
I am running an online webstore built in PHP and MySQL. I would like to build a Java Application through which I can (CRUD) Products, Categories, Orde...
I'm running across a problem with Oracle connection pooling via OracleConnectionCacheImpl. When I connect to a connection pool on my database server (Oracle 10g) via the thin driver, everything works fine until after an unspecified time, the db connection gets dropped (possibly due to idle connections?) and I get an error message:
C...
I'm trying to connect to MS SQL Server (running on my machine) from a Java program. I'm getting the following long winded exception:
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection pr...
In a normal SQL Server 2005 connection string, it's possible to specify the desired protocol in the following format:
Data Source=tcp:myServerAddress;
Initial Catalog=myDataBase;
Integrated Security=SSPI;
Is there a way to do something similar in a JDBC connection string to SQL Server?
Edit:
My JDBC Connection String looks like this...
I get the following error when I try to run my project:
java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=169870080)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
Any ideas?
...
We have business restriction in accessing the database only through stored procedure calls. Caching is also not allowed. Is there value in using Hibernate framework where in you are not using the features like building object relationship based complex queries or caching? We are using considering using the lightweight jdbc option.
...
EJB 3.1 is a few months away and starting threads in Beans is discouraged since it may have nasty side effects. So what other options are there to interrupt bean methods on Jboss and Enterprise servers?
JDBC's setQueryTimeout is not an option since some drivers do not enforce the value.
...
We will be migrating our Oracle 9i R2 database from 32 bit Windows to 64 bit Linux (maintaining same Oracle version). Our Java (jdk 1.5) apps running on Linux 32 bit use the jdbc thin client ojdbc to connect to the db.
While we don't as yet anticipate any issues for the Java app's connectivity and operation, we are working on a risk ass...
Hi.
In many programming languages something like this is possible for prepared statements:
PreparedStatement statement = connection.prepareStatement(
"SELECT id FROM Company WHERE name LIKE ${name}");
statement.setString("name", "IBM");
But not with java.sql.PreparedStatement. In Java one has to use parameter indices:
PreparedSt...
I have a column in my database that is typed double and I want to read the value from it using a JDBC ResultSet, but it may be null. What is the best way of doing this? I can think of three options none of which seem very good.
Option 1: Bad because exception handling verbose and smelly
double d;
try {
d = rs.getDouble(1);
// do ...
I have a web application running in Tomcat 6, and I've managed to configure it to use the built-in DBCP connection pooling, and all is working very well, however I suspect it is running in the wrong isolation level on the database. I'd like it to run in read uncommitted, but I think it's running in read committed and don't know how to se...
If I have an instance of a JDBC DB2 connection, how do I get the current schema?
Either a SQL statement would work, or just a JDBC method call.
...
Consider following schema in postgres database.
CREATE TABLE employee
(
id_employee serial NOT NULL PrimarKey,
tx_email_address text NOT NULL Unique,
tx_passwd character varying(256)
)
I have a java class which does following
conn.setAutoComit(false);
ResultSet rs = stmt.("select * from employee where tx_email_address = 'test1...
I've the following scenario:
Two computer:
First computer running under Windows Vista, second computer running under Linux, connecting both to Oracle 10g.
Oracle 10g is running in the second computer.
I've have done one test program in Java that conecting to Oracle using ojdbc14.jar
This test program is only connecting to database, re...
I want to implement logging of all executed statements with actual bind parameters when using Oracle JDBC. And I would prefer that I could create such logging method only passing PreparedStatement object as parameter.
For example I have created PreparedStatement and have bound one parameter
PreparedStatement ps = conn.prepareStatement(...
I am running a query from my java based web app running in a Websphere container.
This query however, being pretty simple, fails with a weird erorr as follows:
[5/15/09 16:50:33:828 IST] 0000001e SystemErr R com.ibm.db2.jcc.b.zd: Invalid data conversion:Requested conversion would result in a loss of precision of 40000
[5/15/09 16:...
I am developing an application that needs to store information to a database. I would like to use a Scala solution if possible. If the database connectivity fails for some reason, I would like to write the raw SQL statements that would have been executed to a .sql script file. The idea is that when/if the connectivity to the database is ...
I'm working in a legacy environment where an LDAP server is used only for authentication and contains no roles, and authorization is done against a database which contains the user-role mapping, but no passwords.
My plan is to implement a new Tomcat Realm by extending JNDIRealm, and overriding the role methods to call an encapsulated JD...
I'm trying to create tables pragmatically using JDBC. However, I can't really see the table I created from the hive shell. What's worse, when i access hive shell from different directories, i see different result of the database.
Is any setting i need to configure?
Thanks in advance.
...
This seems like a simple question but if you Google it there isn't much help.
I have a web app being hosted on BEA Weblogic 10.x with an Oracle 10g database back end. It works perfectly with one database, but when we make a clone of it and try to use a different WebLogic and Oracle instance we are getting this JDBC Type 91 error every t...