I'm trying to use Circumflex ORM (as suggested on StackOverflow - here, here and here) to connect to a local (embedded) Apache Derby database over JDBC from a Scala project (built with simple build tool). I've followed the instructions carefully, but am having some interesting problems.
Here's the driver and URL components of the cx.pro...
I am able to connect to Oracle 10g (using ojdbc14.jar driver) with java. But when I use the same code in a servlet or file with .jsp extension, I am getting class not found exception. I am not able to understand why this is happening. Do we have different connection strings for JDBC in java and jsp? This is what I use to connect to oracl...
I am having problems remotely connecting to my mySQL database in Java. Here is my error message:
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
I am sure my ip address & port I am using work, since I am using the same ip & port for a mySQL client program.
My hosting c...
i am buiding a small jframe with 2 lables and 2 textfields(Jtextfield1,Jtextfield2) and a jbutton
.i want that when the user enters some data in the Jtextfield1,the data is retrieved from database regarding user and his details are displayed in the Jtextfield2.
i know how to retrieve data from database but how to apply actionperformed to...
I am using the code below to display the records from my database in the swing form. However, when I click on the button it only shows the first record of the database (table in database has 5 records)
private void btnnextActionPerformed(java.awt.event.ActionEvent evt) {
try
{
...
I'm having a problem getting Solr to talk to Microsoft SQL Server via the Microsoft JDBC Driver. I have the handler registered in solrconfig.xml:
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">C:\Program Files\Apache Software Foundation\Tomc...
I'm a two day newbie in both NetRexx and Java.
I tried to modify the IBM red book examples to create a multi-threaded tcp server that executes SQL on a firebird database.
The first attempt is here http://rebol.wik.is/NetRexx/JDBC-bridge.nrx
When I try to loop thru the column data
loop col=1 to nbr_columns
say 'Column' col
-- say r...
Hi,
I've created an ODBC connection to an Excel 2007 Workbook using ACEODBC.dll, which is supposed to work for both .xls and .xlsx files. However when I try to open a connection using JDBC I get a SQLException: [Microsoft][ODBC Excel Driver] External table is not in the expected format. The Workbook is also password protected and encryp...
Hi
Is there a way in spring jdbc to return a composite primary key when a row is inserted.
This composite primary key is made up of values from separate sequences
Any help is greatly appreciated
Regards
Damien
...
I was wondering if there was anyway to specify returned column names using prepared statements.
I am using MySQL and Java.
When I try it:
String columnNames="d,e,f"; //Actually from the user...
String name = "some_table"; //From user...
String query = "SELECT a,b,c,? FROM " + name + " WHERE d=?";//...
stmt = conn.prepareStatement(que...
Hi,
So i have a database where there is a lot of data being inserted from a java application. Usualy i insert into table1 get the last id, then again insert into table2 and get the last id from there and finally insert into table3 and get that id as well and work with it within the application. And i insert around 1000-2000 rows of data...
I'm creating a web project under wicket, Spring, Hibernate, Oracle 11.
I have an error, please help to resolve it.
This is my config file:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframewor...
An update-statement seems to work only with one or three byte long UTF-8 characters.
My test code
def sql = sql.newInstance('jdbc:mysql://.../...?useUnicode=true&characterEncoding=UTF-8',
'...', '...', 'com.mysql.jdbc.Driver')
String value = 'β'
sql.execute('UPDATE Kldb_SynonymVersion SET synonyms=? WHERE id=11940', [value]...
I'm trying to connect to a SQL Server database using JDBC, the database I'm trying to connecto to contains a space, and unfortunately I have no control over the name, so I can't change it.
The code I'm using is:
String jdbcString = "jdbc:sqlserver://" + hostname + ":" + port + ";databaseName=Database Name";
try {
connection...
I have a Java application that uses a Statement to execute a query that should return about 100,000 records. I iterate over the ResultSet, calling the next method to retrieve each record. The number of records I receive varies from one execution to another. No exception is thrown, the next method simply returns null.
What could explain ...
Hello,
This post is intended to be less of a question and more a confirmation that I'm doing things correctly. I've seen many similar posts but I'm not sure I fully understand everything that's been said.
The problem is that, after a certain amount of time, I get an exception when trying to establish a connection to my oracle database....
Hiya.
I'm using red5 1.0.0rc1 to create an online game.
I'm connecting to a MySQL database using a jdbc mysql connector v5.1.12
it seems that after several hours of idle my application can continue running queries because the connection to the db got closed and i have to restart the application.
how can I resolve the issue ?
Kfir
...
I need to consume a file that is being generated on an Oracle server and I have been told to get it using the UTL_FILE package. I intend on consuming the file in a groovy script and have a connection to the database. It is a simple text file and I'd like to pull it down to the server and consume it as I would any other text file but I ...
Hi,
I am writing to ask for advice.
I have to monitor certain "insert" on a mysql db.
In what way is more convenient to do this?
The application uses Servlets and MySQL.
Thank you very much
...
Hi All
I really cant find a nice enum jdbc mapping example.
Is enum actually supported by JDBC ?
I am working with Mysql , i have an enum column , and would like to map to some java enum.
Thanks
...