0
votes
1answer
19 views
Empty ResultSet from query
I'm trying to query for a set and return it as a hash map object with Spring JdbcTemplate. But some reasons I'm getting empty result set from server. It is possible that I have a problem in the ...
0
votes
0answers
9 views
Syntax error in an insert on dbf table
i am trying to make an insert on a dbf table using jdbc, but every time that i execute the system give me this error:
Exception in thread "main" java.sql.SQLException: [Microsoft][ODBC Visual FoxPro ...
0
votes
1answer
20 views
Converting Column Values into Floats in JDBC
I'm using Java with an SQL library to work with a spreadsheet I uploaded to an Oracle Database. I calculated student scores that are one standard deviation away from the mean score, and used the ...
0
votes
0answers
14 views
JDBC based tools to import / export database schema
I'm about to write a JVM based open sourced tool that needs to have a model of a database schema including tables, columns, primary keys, foreign keys and column attributes (datatype, nullable, auto ...
-2
votes
1answer
18 views
loading ojdbc14.jar to Java - JDBC application in a linux machine?
for my job , I wrote a java app (JDBC program) with a select statement to connect to an Oracle DB. I have spent a lot of time trying to figure this out,but no success thus far. My environment is ...
0
votes
1answer
31 views
Java-Eclipse: Package oracle.jdbc.driver does not exist
I have Java -version:
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
And Oracle 11.2 with Windows 8
I ...
1
vote
1answer
24 views
Add values in JTable from Database Table
This is my 1st class name ConnectionDBClass.java
I want to save retrieve the data from the database and then store/show into JTable.
public class ConnectionDBClass implements Job {
public void ...
-3
votes
0answers
17 views
how to save images in the folder of netbean tool? [on hold]
in the project of the Spring, the folder "images" can not storing the images. please if you have any idea about the netbeans tool to how to store the images in the folder.
0
votes
0answers
13 views
OracleResultSet class in ojdbc14.jar and ojdbc6.jar
I have used oracle.jdbc.driver.OracleResultSet class in my program from ojdbc14.jar. After that, i have upgraded Oracle 10g to 11g and from now on wards, i am using ojdbc6.jar.
With this new jar ...
-3
votes
3answers
24 views
Jdbc connection vs socket connection for connecting database [on hold]
Can somebody tell me which way is better for fetching the records from db in java.
Thanks
2
votes
2answers
48 views
Making A Form in Java
import java.awt.FlowLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.ButtonGroup;
...
-1
votes
3answers
30 views
Keyboard input in JDBC program
I have written the following code, but I'm having trouble getting my program to insert 5 student records (enter the data through keyboard). How to substitute values from keyboard into 2nd argument in ...
1
vote
2answers
43 views
How to create Objects in database if does not exists with JPA?
I have a web application that I use JPA / Hibernate I want to know how to hibernate can generate the non-existent tables from entities.
the persistence file is as follows:
What I can add as property ...
-1
votes
1answer
25 views
Using a Blob to get a file from database [on hold]
I'm working on a database project using Oracle Express Edition and using JDBC. I have an excel spreadsheet within the database that I am working with (editing, updating, etc.) I recently started ...
0
votes
1answer
26 views
DB2 Syntax Error in Java, Works Fine in SQL editor
I have the following java code to create a prepared statement from the passed in connection. This is only a portion of the code and I've changed the name of the table for anonymity.
private static ...
2
votes
0answers
33 views
“Escape” Bind Variable ? in JDBC SQL search
So I am coding in Java, using JDBC with SQL to get data from a database. I cannot chnage the data or the column names in the database. Everything worked perfectly until I was told today that another ...
0
votes
0answers
12 views
Design strategies to kerberose authentication before making jdbc calls to update databases
Hi I am working on one Java application which makes uploads from files to the databases like Sybase, Sybase IQ, DB2 etc I have a working code which uploads data to the database from files. Now I need ...
0
votes
0answers
26 views
MSSQL any way to retrieve the PRINT statement output from a stored procedure with JDBC
With the MSSQL driver, is there any way to retrieve the PRINT statement output from a stored procedure with JDBC?
1
vote
1answer
26 views
Wrapping a JDBC Connection singleton in a ThreadLocal
I'm working on small CRUD application that use plain JDBC, with a Connection enum-based singleton, after reading the first part of Java Concurrency in Practice I just liked the ThreadLocalapproach to ...
1
vote
2answers
21 views
Accessing oracle database via SID through JDBC without host:port
When I'm looking for information on how to connect to an oracle database via JDBC, I only find the same solutions which show how to connect with a known host:port. I have to pass this connect string
...
0
votes
1answer
11 views
merge_oracle_ORA-01747: invalid user.table.column, table.column, or column specification
I am trying to do a merge in oracle:
preparedStatement = dbConnection.prepareStatement("MERGE INTO dev_corpus a " +
"USING (SELECT ? corpusid, ? corpus_name, ? corpusdesc, ? ...
0
votes
2answers
41 views
Cannot find or load oracle.jdbc.driver.OracleDriver
I have installed Oracle 11.2 and Java:
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)
In the command ...
-1
votes
1answer
24 views
What if I use resultset.getString() to retrieve a column of type Number [on hold]
Ok so i understand that the getters of resultset retrieve values based on index or column name. And that you are supposed to use the appropriate function based on the type. So isn't his just the ...
1
vote
0answers
27 views
JDBC Issue while shifting from glassfish 3.1 to glassfish 4.0
Here is my Code which work fines on JSF 2.0 and Glassfish 3.1
public static Connection connect(){
try{
String userName = "Defend";
String password = "123456";
String url ...
0
votes
1answer
29 views
NullPointer exception when executing prepared statement
im trying to use the below piece of code to insert in temp table and select it...when I run it, I get a NullPointer exception...Not sure what is the problem..the same runs well with mysql driver..Im ...
0
votes
1answer
56 views
JDBC Connection: Access Denied for User even All Previlleges are Granted
I have an JApplet that connects to the database via this code:
String url = "jdbc:mysql://localhost:3306/moodlele_survey";
String user = "moodlele_garanti";
String password = "garanti";
...
0
votes
1answer
34 views
The conversion from UNKNOWN to UNKNOWN is unsupported
I get the following exception running a stored procedure:
com.microsoft.sqlserver.jdbc.SQLServerException: The conversion from UNKNOWN to UNKNOWN is unsupported.
The procedure is defined like this:
...
0
votes
1answer
49 views
why does not update jdbc statement execute in oracle?
I want to execute below code in java (eclips)
however I get no error in ide, no update any rows in oracle
below code is update_method
public void setUpdate(String statement,String par1,String ...
0
votes
2answers
19 views
Strange behavior for java class CachedRowSetImpl
I have so difficulty to use the CachedRowSetImpl class in java.
I want to analyse the data of a huge postgres table, that contains ~35,000,000 lines and 3 integer columns.
I cannot load everything ...
0
votes
1answer
30 views
Applet JDBC Connection Failed on Client Machine [duplicate]
My self-signed applet perfectly works on applet viewer and my local web browser. However, when I change connection strings according to the db name, user and password for the mysql database on the ...
0
votes
0answers
14 views
Self signed applet on an FTP server failed to connect to a MySQL DB [duplicate]
My self-signed applet perfectly works on applet viewer and my local web browser. However, when I change connection strings according to the db name, user and password for the mysql database on the ...
0
votes
1answer
26 views
Jetty authentication JDBC
I'm using jetty with BASIC authentication and I need to authenticate my client in my unit tests but I got this :
WARN: AUTH FAILURE: user admin
Failed : HTTP error code : 401
I don't understand ...
0
votes
2answers
26 views
Changing Column Name in MDB file using JDBC java
I am currently writing a mdb Migration script in Java. This is noting but adding and modifying some of the column names in the MDB file.
I created new tables and thats not a problem but I could not ...
0
votes
0answers
15 views
JApplet: JDBC Connection Local Server [duplicate]
I have a JApplet development that perfectly runs on my local computer's viewer and also browser( it is self-signed by a generated key by NetBeans). On my local brower it did not work before I signed ...
1
vote
0answers
30 views
Exporting/importing data types in DBUnit?
I'm trying to use DBUnit to export data from our AS400 and import it into a HSQLDB database for JUnit testing, however, data type information doesn't seem to be exported/imported. Everything seems to ...
0
votes
1answer
22 views
How to use InitialContext database info in a Java SE project
This may be a somewhat strange question, but I'm not sure how to do this another way. Basically, I am sharing connection code between two maven projects. One is a Maven Web application and the other ...
0
votes
3answers
38 views
Type Of JDBC Driver Used
To connect to DB most of us use JDBC Api. We normally include driver like ojdbc14 in class path, and in program we use Class.forName and all. Unlike in most other jars the imports are not from ...
0
votes
3answers
24 views
Workaround for “null primitives” in JDBC PreparedStatement?
When using raw JDBC, you can parameterize a PreparedStatement like so:
PreparedStatement statement = connection.prepareStatement(someSQLString);
String someString = getSomeString();
Integer int = ...
0
votes
0answers
34 views
Java connect to OracleDB very slowly (with ojdbc6.jar and Linux)
I'm try to deploy the web services that have a connection to ORACLE database (10g).
Currently, I have
- CentOS 6.4 64bits
- Apache Tomcat 7.0.42 with JDK 1.7.0_25
- Ojdbc6.jar
When I calling web ...
0
votes
1answer
47 views
JUnit tests with h2 database behave strangely
I wrote several JUnit test classes, in a maven project that uses JDBC to connect to a h2 database.
I have 8 test classes.
When I run All tests with IntelliJ, I have a JDBC error (on the last test ...
0
votes
1answer
25 views
Can we use DDL Commands in a prepared statement (PostgreSQL)?
DDL commands follow:
CREATE TABLE — creates a table with the column names the user provides.
DROP TABLE — deletes all rows and removes the table definition from the database.
ALTER TABLE — ...
-1
votes
2answers
36 views
In Java DB2 JDBC: How can one use null parameters in a WHERE clause for a SELECT statement where the value can be either null or not null?
For example I have the following select query for a PreparedStatement:
"SELECT FOO FROM BAR WHERE FOOBAR=?"
The parameter for FOOBAR can have a value and it could also be null.
Would the following ...
-2
votes
1answer
26 views
Insert data from xml to database for particular input say for name node [on hold]
i have a xml file say :
<?xml version="1.0"?>
<students>
<student>
<FirstName>John</FirstName>
<grade>B</grade> ...
0
votes
1answer
15 views
android tomcat read servlet string text
i am very new to tomcat and android so i am trying to readservlet files but there some error .. need help. thanks! (what i trying to do is read the name from the tomcat database).
public void ...
0
votes
1answer
23 views
Refresh/Recreate All Panel in a Card Layout each time any button is clicked in JFrame Holding these Panels
I have a jFrame witch contains two panel Right Panel and LEFT PANEL.( Both are part of Split Panel)
Right Panel has a card layout.
p1=new AddPanel();
p2=new DeletePanel();
c2=new CardLayout();
...
0
votes
1answer
28 views
ResultSet is Closed Error on retrieval
I'm attempting to store a list of words in a database. All of the other database oriented functions work well, but this specific method, when called in a loop returns a ResultSet is Closed Error. I'm ...
-2
votes
2answers
26 views
How can i get data in jtable from mysql database using object [closed]
I am trying to show data in a JTable from MySQL database, but I did not get the problem what should I do? This is my code:
try
{
Class.forName("com.mysql.jdbc.Driver");
Connection con1 = ...
0
votes
1answer
19 views
hsqldb no change after backup restore until restart
I'm running hsqldb in server mode and connecting to it through Java. After I try to restore a from a backup via org.hsqldb.lib.tar.DbBackup --extract the DB files are replaced properly, but the ...
-3
votes
1answer
61 views
Cannot connect to database from Swing Application [closed]
If you would like specific code to look at i can provide, however i don't believe the problem lies in the code. I have an application that accesses a sqlite database and populates JTables with the ...
2
votes
2answers
32 views
Java JDBC Email PrintStackFree
I have a program which reads a data from database and does some calculations. I have it in try and catch statements and printing the error using e.printstackfree(). However, is there a way we can ...