0
votes
0answers
16 views
JDBC : How to passing 2d array parameter to Oracle Procedure?
I'm trying to pass 2d array string parameter to Oracle procedure.
- for excel data insert to Oracle DB using by procedure.
I finishied importing excel data to 2d array.
I want to know how to I pass ...
0
votes
3answers
35 views
Which way is better for update database record?
I have two method for update:
String query = "update mytable set name = 'new_value' where id ='20' ";
Connection conn;
PreparedStatement pState;
try {
conn = DriverManager.getConnection(dbUrl, ...
0
votes
0answers
28 views
JTable not showing data
I have got a problem. I connect mssql from java. I return data from sql.I want to show jtable this data but I didnt assign jtable from DefaultTableModel.
My code:
public void displayTable(ResultSet ...
0
votes
0answers
16 views
Properties in rowsets using JDBC in JAVA
What would be the use of of a having Properties as a Java Bean for a rowset?
From this oracle java tutorial:
Function as JavaBeans Component
All RowSet objects are JavaBeans components. This ...
-1
votes
2answers
32 views
Inserting NULL values into a MySQL table via JDBC program
I created a database in MySQL using below DDL:
CREATE DATABASE iac_enrollment_system;
USE iac_enrollment_system;
CREATE TABLE course(
course_code CHAR(7),
course_desc VARCHAR(255) NOT NULL,
...
1
vote
2answers
17 views
In memory Database to test mysql database operation API using in memory database with maven
I have to test some api using JUnit test cases. Actually I have some simple JDBC database connection with API code to retrieve data from MYSQL database.
But I need one inmemory databases to test ...
0
votes
0answers
28 views
Hanging on DriverManager.GetConnection() in java
I am new to this so please bear with me. I have an application that requires a connection to a MS SQL Server 2008 database. Now I have the jdbc driver and I have been struggling to get it to connect ...
0
votes
1answer
33 views
Checking the condition Before uploading in to the table
From the below executeUpdate() method i want to update the data in the db2 table. Before doing that i want to check whether C_Conf and D_Conf has values "Yes" means i need to replace with 'Y' and if ...
0
votes
5answers
31 views
Inserting data into a H2 Database Table
I'm a newbie in SQL. I'm trying to teach myself how to work with H2. I've managed to create a Table, but when I try to insert data using another class the data just doesn't get inserted.
Here's my ...
0
votes
5answers
54 views
MySQL/Java error
Newbie programmer here. Upon doing mvn tomcat:run I get the following error:
SEVERE: Servlet.service() for servlet appServlet threw exception
...
0
votes
2answers
27 views
What is a good JDBC Connection Pool Framework for insert into Mysql Database [on hold]
I am writing a Java application, the high level overview of this application is listening for restful events and when these events come in, it will be inserted into the Mysql database.
I am using ...
-1
votes
1answer
33 views
Can a ResultSet be 'null' in Java?
I have a very basic bit of code which executes a select query and returns a boolean depending if the result set is empty or not.
public boolean checkIfUserHasPreferences(String username){
...
0
votes
2answers
51 views
Postgresql SETOF vs Refcursor
I have a basic user table in Postgresql,
CREATE TABLE myuser (
userId bigserial primary key,
user_name varchar(32),
password varchar(32)
);
I want a stored procedure to retrieve this data. ...
2
votes
1answer
20 views
How to cancel a statement with derby?
I have a very long sql statement, with java derby database, and I should want provide to the user a "cancel" things. But I get :
Caused by: java.sql.SQLException: Feature not implemented: cancel.
...
0
votes
0answers
19 views
Connecting to SQL Server 2008 database from android (java)
I have the following code, which does not get to the .setText("Successful") statement, indicating an issue with the drivermanager.getConnection statemenet (I think). It finds the database driver that ...
0
votes
0answers
36 views
Long running JDBC transaction: Closed Connection
I am using c3p0 for connection pooling and facing "Closed connection" error with large data sets. I expect my transaction to be atomic and to run for almost max 2 hours.
For large data sets, which ...
0
votes
3answers
44 views
Closing the cursor of a ResultSet?
From this oracle java tutorial:
The following statement specifies that the cursor of the ResultSet
object generated from the getPrice query is closed when the commit
method is called. Note ...
-1
votes
2answers
25 views
MySQLNonTransientConnectionException in JDBC
I created a database with one table in MySQL:
CREATE DATABASE iac_enrollment_system;
USE iac_enrollment_system;
CREATE TABLE course(
course_code CHAR(7),
course_desc VARCHAR(255) NOT NULL,
...
0
votes
1answer
41 views
Newbie android developer trying to connect to SQL Server 2008
I am fairly new to android development, and I am trying to connect my app to a SQL Server 2008 database. I get a an error saying "Could not find the database driver net.sourceforge.jtds.jdbc.Driver" ...
1
vote
1answer
24 views
Show SQL error message
I am using JDBC to connect to MySQL in my java project.
I have implemented some check constraints in the mySQL table.
I have a form in which the user enters some values and submits it to the MySQL ...
2
votes
2answers
21 views
Difference between non-repeatable read vs dirty read
From this oracle java tutorial:
A non-repeatable read occurs when transaction A retrieves a row,
transaction B subsequently updates the row, and transaction A later
retrieves the same row ...
0
votes
1answer
17 views
importing source code of mysql Jdbc driver into eclipse workspace
I have downloaded latest mysql J driver in compressed format. After unzipping file, it has jar file and its source code(src/...). How to import this code into eclipse so that i can easily debugging ...
0
votes
1answer
14 views
org.jumpmind.db.model.ModelException: Unknown JDBC type DATETIME
I am using this XML document to load a specific table into a postgresql database:
create_table.xml:
<?xml version="1.0"?>
<!DOCTYPE database SYSTEM ...
0
votes
1answer
25 views
Speed up multiple different updates-querys
I am working with an application that manages a larger number of storage objects (each storing a bunch of simple variables). These objects are saved via external databases, namely MySQL and SQlite.
...
0
votes
1answer
26 views
ConnectionManager: pool of connection
i have a jdbc client that communicate with a postgresql database by contact a RMI server. In this rmi server i have a simple ConnectionManager code:
public class ConnectionManager {
private ...
0
votes
2answers
36 views
Difference between Serialization and saving an object via JDBC to JAVA_OBJECT
I am aware of what Serialization is however I have not found any real practical example describing the latter one (saving an object in a database taking advantage of the JAVA_OBJECT mapping).
Do I ...
0
votes
1answer
18 views
Connect DB2 with Java, configuration
I try to connect from my Java-Application to an existing DB2 Database.
My Code looks like a minimal version of the example shown at connect DB2 with Java.
public static void main(String[] argv) {
...
2
votes
2answers
45 views
How is driver class located in JDBC4
One of the great additions in version 4 of JDBC You don't have to explicitly load the
driver by calling Class.forName anymore. When your application attempts to connect the database for the first ...
0
votes
3answers
39 views
Autoincrement in oracle11g and JDBC
I'm developping an application that connects to an Oracle 11g database, using ojdbc6 as the JDBC driver. I created a trigger and a sequence for the table where I need to add value, so that the ID ...
-9
votes
1answer
69 views
Does the JDBC have its own transaction manager, or does it just call the transaction manager of individual databases? [on hold]
Does the JDBC have its own transaction manager, or does it just call the transaction manager of individual databases?