jdbc Questions

4

Solved

I'm working on a web project and I recently installed postgres 9.1.1 The postgresql server is up and running. I can connect via psql as usual and everything is loaded and properly saved from a dum...
Oxysalt asked 26/10, 2011 at 15:11

17

I am trying to use H2 to connect to a database in Java (using Eclipse as the IDE). The sample does (below) throws a ClassNotFoundException. The thing is, I did add the h2 jar file to the syst...
Merci asked 24/10, 2010 at 11:31

5

Solved

While executing a JDBC program, I get the following error while connecting to database: Exception in thread "main" com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Client does not...
Presswork asked 19/5, 2018 at 11:42

5

In Java, I have a query like this: String querystring1= "SELECT rlink_id, COUNT(*)" + "FROM dbo.Locate " + "GROUP BY rlink_id "; The table rlink_id has this data: Sid lid 3 2 4 4 7 3 9 1 ...
Radiograph asked 4/10, 2011 at 5:18

5

Solved

I am getting FATAL: the database system is shutting down errors while creating PostgreSQL JDBC connections to a PostgreSQL 9.2 server. The specific exception path I'm getting from JDBC is here: Ca...
Bilbe asked 27/6, 2014 at 1:17

4

Solved

I have tried to resolve by adding missing/unnecessary jar's but nothing works for me. if you know how to resolve this issue then kindly help... Thank you in advance. I am using JDK 9.0.4 install...
Megaton asked 27/2, 2018 at 20:46

4

Is there a better way of retrieving the results from a ResultSet? Calling getString() on each value is very slow. It takes up to 2.5 seconds to put about 400 rows, 16 columns into an array before I...
Henriettahenriette asked 12/10, 2014 at 5:23

5

Solved

This is my table. Ticket(id int auto_increment,name varchar(50)); after inserting into this table i want send id and name to mail.. how can i get the last Inserted value. help to solve this... ...
Antoninaantonino asked 25/9, 2012 at 11:21

2

Solved

The MySQL JDBC Driver defines these two properties as: useServerPrepStmts - Use server-side prepared statements if the server supports them? cachePrepStmts - Should the driver cache the pars...
None asked 29/8, 2015 at 13:21

4

In the middle of my web-development I just close my web-app in my eclipse IDE, about a minute, I just saw a WARNING in my eclipse console. WARNING: The web application [/Spring.MVC] registered the...
Weikert asked 6/9, 2014 at 11:57

5

Solved

While connecting to MySQL database I do following steps Connection con = null; Resultset rs = null; Statement st = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.g...
Sharie asked 23/2, 2013 at 10:1

2

Solved

With the Play Framework 2.1 I have the following SQL defined in my evolution: CREATE OR REPLACE FUNCTION idx(myArray anyarray, myElement anyelement) RETURNS int AS $$ SELECT i FROM ( SELECT gen...

2

Solved

I have a database which is using composite keys. Is it possible to utilize spring-data-jdbc? I tried the milestone version 1.1M2 where I mapped my entity in the following way: class History { @I...
Whish asked 4/4, 2019 at 10:39

3

I am creating a query dynamically based on a user choosing fields to be displayed in the result. The problem is that when data is to be retrieved from the database I normally use getXXX() methods t...
Klara asked 9/3, 2013 at 12:16

3

Solved

How can I iterate ResultSet ? I've tried with the following code, but i get the error java.sql.SQLException: Illegal operation on empty result set. while ( !rs.isLast()) { rs.next(); int id = r...
Zhukov asked 30/3, 2010 at 13:29

4

Solved

I'm using jdbcTemplate to make JDBC connections to a mySQL DB prepared statements to protect myself as much as possible from SQL injection attacks in need to accept requests from the user to sor...
Iowa asked 14/9, 2012 at 18:43

4

Hello i have a query to an Oracle System which involves a view which joins other tables by apliying an TO_NUMBER() to the tables primary key. If i do the query using TOAD the query is very fast (1...
Leger asked 27/8, 2009 at 8:2

4

I'm currently facing an issue where a specific SQL-query is taking about 30 seconds to issue from within my Java application but <1 sec in a SQL-client (SQL Developer). In the the question, Sl...
Granivorous asked 2/11, 2010 at 14:35

16

Solved

I am writing a "server-side extension" for SmartFoxServer (SFS). In my login script, I need to make a connection to MS SQL Server, which I am attempting to do using JDBC. I have tested the JDBC cod...
Belgrade asked 22/5, 2011 at 12:8

22

What is wrong with the code there are lots of error while debugging. I am writing a code for a singleton class to connect with the database MySQL. Here is my code package com.glomindz.mercuri.util;...
Rowdyism asked 5/7, 2013 at 8:48

2

Solved

Connection.getNetworkTimeout() is number of milliseconds the driver will wait for a database request to complete. Statement.setQueryTimeout() is independent of the timeout value specified in Conne...
Holstein asked 13/11, 2014 at 16:13

5

Solved

acttype is an enumcs so you can't insert it as a normal string without casting it to an enumcs INSERT INTO dir_act (actcode,actname,acttype,national_code) VALUES (?,?,?::enumcs,?) Where as for upda...
Schoolmate asked 1/11, 2016 at 8:53

6

java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver I got the above exception when i trying to deploying my Application into tomcat. but the weird thing is , i tried wi...
Dropping asked 14/3, 2013 at 20:26

5

I am trying to make a connection to oracle through java program. Following is the configuration. Windows 7, 64 bit. JDK 1.6 Oracle client 11g R2, 64 bit. ojdbc6.jar in the class path of my standa...
Bryna asked 18/1, 2012 at 8:47

3

I am trying to research this issue on the following two errors connecting to Oracle DBs: Closed Connection java.sql.SQLException: Io exception: Socket read timed out My understanding: Closed ...
Glycoside asked 21/5, 2013 at 20:40

© 2022 - 2024 — McMap. All rights reserved.