jdbc

Row from a database as string (JDBC)

Is there a direct method to get the all the elements in a row from the ResultSet as String? JDBC ...

Using info from a database as variable values

I am working on a java project and I need to pull some values out of a database and turn them into variables the program will then use to make a billing statement. I can get the program to connect to the database just fine, and the mySQL statement to call the data I need is easy enough. I just can't seem to figure out how to then have ...

Recommendation for JDBC SQL client tool

Can someone recommend a good, open source, standalone developer tool for querying SQL databases using JDBC and exporting the results to a file? I know a lot of database vendors provide their own tools, but I need one that will allow me to plug in my own custom JDBC driver and work against any database. A GUI is preferable, but not requir...

JDBC: What is the correct JDBC URL to connect to a RAC database

Hi, We were connecting to Oracle from our code with a simple (custom) JDBC connector class. This class reads the connection properties from a resource file and tries to make a connection to Oracle (thin connection). However, recently the database have moved to a RAC and now the application is unable to connect to the DB. Here is the ...

Parameterized Query: Check if field is in array of values in SELECT statement

I'm trying to configure a parameterized query to the effect of: SELECT field1 FROM myTable WHERE field2 IN (1,2,3,4) The database I'm using is Postgres. This query run successfully unparameterized, but I'd like to use a parameterized query with a JdbcTemplate to fill in the list for valid field2 values (which are integers). Trying v...

Use NamedParameterJdbcTemplate to update array field

I have a double precision array field dblArrayFld in a table myTable and I'd like to update it using Spring's NamedParameterJdbcTemplate (I'm using Postgres). I'm running code like this: SqlParameterSource params = (new MapSqlParameterSource()) .addValue("myarray", myDblArrayListVar) .addValue("myid", 123); namedJdbcTemplate.updat...

Multithreading in JDBC connectivity

i am trying to upload a file into the server and storing the information of the file into an Access database, is there any need to handle the threads while database connectivity for multiple user. If yes how to do it? ...

extract data from .xls file

I want to extract data from a Excel file and store them into a access database, how to do this? ...

connect Ms Access to java

I extracted data from excel using poi api. Now I want to store the data in access please clarify ...

identity from sql insert via jdbctemplate

Is it possible to get the @@identity from the SQL insert on a Spring jdbc template call? If so, how? TIA ...

What is Type 4 XA driver?

In our application when we create the Datasource, we select the Database Name DB2 Driver: BEA Type 4 XA DB2 But what i know is, there are only 4 types of Driver. Then what is Type 4 XA driver? ...

JDBC query returning no rows, but interactive query does?

Hi all, I'm attempting to retrieve data from a SolarWinds network performance database (MS SQL 2005) and a query that works perfectly fine interactively (in the Orion database manager) returns no rows when run via JDBC. Any ideas? The query itself is a shocker (I dislike MS-SQL date/time handling which I believe forces queries like th...

Flex Java BlazeDS Dashboard - use Spring/JDBC or Hibernate ?

Hi, I am developing a IT Monitoring Dashboard for the company I work at. The system will primarily perform monitoring of files, databases and servers. There will be a small part of the system which will allow the users to configure static data about the system eg: file locations, server names etc... So as the app. will be a dashboard a ...

How do I sanitize SQL without using prepared statements

For some sql statements I can't use a prepared statment, for instance: SELECT MAX(AGE) FROM ? For instance when I want to vary the table. Is there a utility that sanitizes sql in Java? There is one in ruby. ...

Accessing output parameters before processing result set in SQL Server via jdbc

I am calling an 2005 MS SQL Server stored procedure using the MS JDBC Driver and want to access the output parameters before processing the result set as follows: proc = "{call mySproc(?,?,?)}"; conn = ds.getConnection(); callableStmt = conn.prepareCall(proc); callableStmt.setString(1,inputParam); ...

Skipping ahead to a specific JDBC Record Number

What is the best way to skip ahead to a specific record number in a Java JDBC resultset? ...

Connection timeout for DriverManager getConnection

I am trying to connect to DB using the standard JDBC way connection = DriverManager.getConnection(url, username, password); Is there a maximum value of timeout on the connection, how long does a connection live, can I increase the value. I want in cases the connection to be open forever , is it a good idea. ...

how to enable SQL trace for a closed source app running on jboss and using ojdbc14.jar

Hello Hackers! I have a java app (deployed on Jboss/ WebLogic) that I have to use, it uses ojdbc14.jar to talk to oracle, it's is a neat app but the documentation sucks, a lot of magic happens behind the scenes. I need to trace all SQL calls. I have complete control on DB, App servers, DBA rights, admin rights everything. How do I do ...

Glassfish doesn't load jdbc

I've a application in swing and ejb3 inside glassfish v2ur2 and until one week ago all was ok. in sometime, the glassfish never more load the jdbc driver of postgresql and the connection with the bd fail, but the jdbc driver is in the project and in the classpath. the only way to fix it was put the jar inside lib folder of glassfish doma...

Cannot load an SQLite JDBC Driver, Any Ideas ?

So i need to write a program that accesses and modifies an SQLite DB for a school program and am looking at the basics firstly. Now, I am looking at this to get me started: link text. The problem is that when i compile Test.java (The example code on the website) and then run the command: java -cp .:sqlitejdbc-v056.jar Test like it tel...