Recent update: 2008-5-9

BatchUpdateException

723 byte By balajigovindana at 2007-12-17
Hi friendsWe want to implement batch update feature of JDBC 2.0 in our application.If some exception is thrown while the batch is being processed then the update should proceed for the remaining statements in the batch.(i.e) say there are 10 queries to be executed in a batch and of these 5 ...

ClassNotFoundException at JDBC connection

3491 byte By AAmya at 2007-11-23
Hi 1)I have classpath:%CATALINA_HOME%\common\lib\servlet.jar;c:\jdk1.4.0_02\lib\tools.jar;c:\java;c:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msbase.jar;c:\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar;c:\Microsoft SQL Server 2000 Driver for ...

mysql connector in linux - java.lang.ClassNotFoundException: com.mysql.jdbc

1195 byte By Victorqeda at 2007-11-15
I use mysql-connector-java-5.0.6-bin.jar and j2eesdk-1_4_03-linux.bin.I created a new directory: /usr/java/javaclass.The CLASSPATH variable point to this directory, where I copied the mysql-connector-java-5.0.6-bin.jar file.In the same directory I have the .java file that I test with.I compile ...

Change DB's path

582 byte By Funky_1321a at 2007-11-15
Hello!If I install ODBC driver on my Win XP for *.xls (Excel file) is there any way to connect to the database per JDBC-ODBC bridge and change the path name of the database (*.xls file) ? I have to make an appliaction that reads excel tables and changes some values. But the file excel file ...

connection.commit() in a javax.transaction.UserTransaction

843 byte By aonisha at 2007-11-14
Hi Is it possible to do a connection.commit() when the connnection is participating in a transaction.I have a scenario wherein I am using different connection objects to insert data in different tables . Before inserting I am creating a UserTransaction which i am committing after successful ...

Microsoft SQL Server 2005 JDBC, uncommited transactions. Pool Manager Help!

715 byte By Chaseja at 2007-9-25
So we switched to Microsoft sql 2005 JDBC. However, in the Java if you close the connection before a transaction is commited, it gets recycled in to the connection pool still open.Than means that the next piece of code that uses the connection will never be commited and our database locks up ...

How to read and write in Ms-Excel using java.

207 byte By s@ia at 2007-9-24
I want to use Ms-Excel as database, I need to read and write from it, can anybody explain with program how to read and write in Ms-Excel. I would be very thankful to him/her. Thanks in advance.

Closing Oracle cursors from JDBC

2333 byte By QldKeva at 2007-9-24
We have a class DB for connecting to an Oracle database with the following method:public ResultSet execQuery(String sqlQryStr) throws SQLException {Statement stmt = null ;ResultSet rs = null ;try {stmt = theConn.createStatement (); rs = stmt.executeQuery(sqlQryStr);} catch (Exception e) {throw ...

Unable to load database driver from my applet's jar file

638 byte By flyingmulleta at 2007-9-24
I'm trying to set up an applet that will talk to a MySQL database. I have no problem connecting to the database as I'm developing the code ("un-jarred"), but when I create a jar file of my code to test through a web browser, I cannot connect to the database due to the usual ...

a free ms access driver

98 byte By cloudncalia at 2007-9-24
all i could find where one that cost moneyany help plza free ms access driver

Not able to insert data?

3871 byte By venkateshpa at 2007-9-24
I am not able to insert the data. Am getting a compilation error . The below is my code.I have given the servername,database name,username,password in the original program.import java.sql.Connection;import java.sql.DriverManager;import java.sql.*;import java.sql.ResultSet;import ...

[Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error

3106 byte By matchaa at 2007-9-24
Hi , i am trying to execute siple SP using JDBC-ODBC Bridge Driver Here my code :String dsn="Tritek1";String user="sa";String password="imcindia";Connection con1 = null;CallableStatement cstmt = ...

JTDS converting string to NTEXT

467 byte By u77171a at 2007-9-24
I created a callable statement that passes two parameters to a stored procedure. One of them is a string. When the string is larger than 4000 characters it looks like the the driver is converting it to a NTEXT datatype. Since the stored procedure is expecting a VARCHAR I get the following ...

Thin jdbc oracle driver and java string problem

396 byte By da01661a at 2007-9-24
Dear all,I have an utf-8 oracle database storing some chinese and portuguese, when i used thin jdbc driver to query the database table, the returned varchar2 string is not shown correctly in my java program and also my jsp?Could anyone tell me what's the problem? Do i need to specify the ...

is thr any way to know how many coloumn in ResultSet object?

172 byte By param530a at 2007-9-23
hi madam, I want know how many column in result set when query like this "select * from table_name"is thr any way to knowthank in advance

Updating Tables In a db

763 byte By Freshjivina at 2007-9-23
Hi, I'm using JBuilder to interact with a ms access 2003 database. The problem I'm having is when I insert values into a table in the database from my java application, and then query the table to ensure that those values were entered, it appears as if they are not in the database. However if ...

retrieving result set from stored procedure

179 byte By shaharwra at 2007-9-23
Hi all,i made a stored procedure that retrieve a result set.i have a simple question: which type should i write in java when i decalring the output parameter?

oracle package does not existUrgent::

312 byte By nitsonlinea at 2007-9-23
hi please help me for this codeDriverManager.RegisterDriver(new Oracle.jdbc.driver OracleDriver());error :>> oracle package does not exist.i m using netbeans ide for java & it show the oracle package but give the ...

how to insert data into the mysql table by giving as a text file

153 byte By mandava_ravisha at 2007-9-23
Hi,Any one know's how to insert data into the mysql table by giving as a text file as the input in JSP.Please respond ASAP.Thanks:)

SQL Syntax error in PreparedStatement appearing only with setObject Integer

1363 byte By deerskina at 2007-9-23
using: - MySQL 4.1.12- mysql-connector-java-3.1.10Hello,it is only a example for one value from Map. For String it works good.Problem arisses with setting Int value from Map. When I replace '?'with the number (for example 1) and put it into my MySQL Command Centrer command line - it is ...

ResultSet question

235 byte By JonathonMuira at 2007-9-23
When I query a database and get the ResultSet back, is there any parameter or method that can be used to get the number of records that was returned without having to go through every item in the list and incrementing a counter?

Where does resultset data stored? Either in server or client?

538 byte By EsakkiSundara at 2007-9-23
Hi, I wanted to know the answers for the follwoing queries. If you guys could help me out it would be grateful.1) When a query is executed and the resultsets are obtained from database where exactly is the result set placed? Is it placed in the server or on the client machine?2) Also what ...

MySql and Tomcat 5.5

2060 byte By ianjkinga at 2007-9-23
I have read several threads, and others are having this problem but the resolutions do not seem to be posted or are different than what I am having. Hopefully someone can help me figure out...Cannot create JDBC driver of class '' for connect URL 'null'I verified that my url was correct ...

Mysql Active Connections

351 byte By ARNaidua at 2007-9-23
HiI dont think its right place to ask this question. But I have tried in google too. I dint find the solution. I want to know how many connections are active in mysql server. I treid with $mysqpadmin varaibles It can show only maximum connections and some otther infoPlease help thanks in ...

Crystal Report

163 byte By Dev_Javaa at 2007-9-23
Hi,--How can I find Crystal Report for Java in the internet , and How can runit via java code?--Can I send parameter to crystal report?

Performance problem with ojdbc14.jar

657 byte By cyuva at 2007-9-22
Hi,We are having performance problem with ojdbc14.jar in selecting and updating (batch updates) entries in a table. The queries are taking minutes to execute. The same java code works fine with classes12.zip ans queries taking sub seconds to execute.We have Oracle 9.2.0.5 Database Server and I ...

How can i get the meta data from database?

362 byte By HannaLam at 2007-9-22
Hi, all java and db experts, I need to write a tool to generate java file which will be used to hold the resultset of a stored procedure of Oracle. Is there any API call or tools to connect to db and then get the meta data of the return cursor instead of reading stored procedure definition on ...

DriverManager.registerDriver -- can it take a variable as argument?

470 byte By murthy64 at 2007-9-22
While trying to make code generic, noticed that DriverManager.registerDriver takes a class like this:DriverManager.registerDriver (new oracle.jdbc.OracleDriver ()); How does one make the argument a variable? The intent is to make the code read properties file, determine what kind of RDB and use ...

storing and loading images in a java application using mysql

835 byte By mystified_natasha at 2007-9-22
Hi!I hava a java application connected to mysql database. I have data (questions) stored in the mysql database which is randomly generated when a query is executed.In the following snippet, the first line calls the database connection class and connects to the database and then the query is ...

MS Access/JDBC HElp

377 byte By rwornora at 2007-9-21
I am tryin to acces a ms access 2000 database with a java applet and am getting this error messageregisterDriver() Failed: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)when I attempt to register the Driver. Has anyone seen ...

jdbc-odbc: executeUpdate() not actually updating MSAccess Table!!!-

1784 byte By tkmanoja at 2007-9-21
I am connecting to the MS-Access table through the DSN from my java program. I am trying to do a executeUpdate command to insert/update a particular record in the table. My progam is working fine without any exceptions/errors thrown. The executeUpdate method is returning an integer value '1'. ...

jdbc or jdo or hibernate

1011 byte By tpass001a at 2007-9-21
Hi, I am totally new to database programming using java but have worked on java and databases individually for quite a long time. So here is the requirement. From the 3rd party application (connectivity no problem) I will get a database name and table name. If a user clicks on that link, I ...

MS SQL Server JDBC Driver

126 byte By cyshanga at 2007-9-21
Hi, I just downloaded MS SQL Server JDBC driver, can someone tell me where can I get sample code to access data?

Stored Procedure call

323 byte By ramesh79a at 2007-9-21
Hi All,I am able to call a stored procedure... but what should be done if the input parameter for the stored procedre is a VARRAY and the out prameter is a CURSOR...I don't how to pass values to VARRAY and read the value from CURSORCan you plz. help me out in this...Thanks ...

create an alert window?

225 byte By majandraha at 2007-9-21
how do I manage to send an alert window when users work on my application and should receive a warning not to do a special event?for example:do you really want to delete selected row?button: yes/no

MySQL Driver Class Not Found

1776 byte By wbarbee2a at 2007-9-21
MySQL Driver Set Up problems - Class Not Found error====================================================I have recently begun conversion of a working Java + MS Access application to Java + MySQL. I get a Class Not Found error trying to set up the driver. I am using MySQL Connection/J 3.0.8.I ...

SQLException: No suitable driver. what is this?

483 byte By gafma at 2007-9-20
I writting an application using JSP/Servlets and i齧 trying to make a connection to a mysql db. But when a try to load the driver i get this message: java.sql.SQLException: No suitable driverThe database is running ok, because i tested it with the mySqlFront tool. I齧 using Connector/J 3.0.7 and ...

Servlet SQL INSERT error

1367 byte By moleary77a at 2007-9-20
Hi,I have the following error when trying to insert ino an oracle database. The server Im using is TomCat.SQLException: ORA-00917: missing commaThis is my code:public boolean registeruser(String Fname, String Lname, String Email, String Username, String Password, int Mark1, int Mark2, int ...

Can an Applet on a Client machine using JDBC read remote mysql data?

5517 byte By psignosisa at 2007-9-20
Hi,Does anybody know if this is possible, or can shed some light on something that I have/haven't done properly?My project is to create a Client / Server database scenario. On the server side I am using Unix / Apache and Mysql. On the Client side I am using Windows XP / Internet Explorer 6 and ...

Log for all the sql statement executed

304 byte By AnjanaVa at 2007-9-20
Hi, I would like to know how to see the log for all the sql statement executed starting from connection to all the database related actions.Is it something that i need to set it up in the driver?I'm using Tomcat and JDBC driver.Please ...

*ANY* solution for the pocket pc?

574 byte By cryptyk at 2007-9-19
I've read the threads requesting JDBC drivers for Pocket Access, and they all point into the same black hole. I'm not going to be picky. I just need *ANY* free solution for database connectivity on the pocket pc. I've seen a couple open source DBs for java but they all require at least Java ...

how to connect to db2 with jdbc

335 byte By stephen96 at 2007-9-19
hello guys:following a slice of codetry { Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();} catch (Exception e) {}try { con = DriverManager.getConnection("jdbc:db2://192.168.0.1/DB", "admin", "admin"); the error "no suitable driver" will be seen when running, why ...

Checking if table exists

550 byte By Cranky1 at 2007-9-19
I found a query on 4GuysFromRolla to check if a table exists on SQL Server 2000, and then execute a query. Here's my code:String sql_query = "if EXISTS (select * from INFORMATION_SCHEMA.tables where table_name = '" + table_name + "') Select * from " + table_name;ResultSet rs = ...

DbConnectionBroker

410 byte By lazlofruvousa at 2007-9-19
http://www.javaexchange.com/ is down, and has been for as long as i've been trying it....nslookup's reveal no information, so it looks as though their DNS stopped providing for them.In the meantime, I want to get my hands on a recent copy of DbConnectionBroker...any idea where I could get ...

Very basic question for a newbie in JTA

3082 byte By chessplayera at 2007-9-19
Hello,I would like to implement DB transaction using JTA implementation of my app server (Weblogic 6.1). If there are n statements, I want them all to be executed and succeed. If one fails, all the changes made to the DB need to be rolled back. Very simple. The most basic transaction you can ...

quotes in text field on java server pages and sql

19271 byte By Arnaud_turquoisa at 2007-9-19
I am french.Hi all,I have a memo field in Ultradev (and some text fields) that are inserted into an Filemaker database when the form is submitted.... nothing too exciting, but, i now have to be able to have apostrophes in the text & memo fields. When i have an apostrophe in the field, my ...

No suitable Driver!!! what the hell is this?!?

2121 byte By khalidmmm at 2007-9-19
Hi all...well i'm facing this problem from the first day i learned how to use JDBC to connect an applet to an access database... i thought that this should be simple and straight forward but it appears not... when i was trying to do so, there were some three or so exception thrown when i run ...

Prepared Statements and Oracle functions:

1079 byte By rdare at 2007-9-18
Consider this code:String searchText = "someInputText"; StringBuffer sqlstmt = new StringBuffer();sqlstmt.append("SELECT ID_FIELD FROM ");sqlstmt.append("MY_TABLE WHERE NAME_FIELD ");sqlstmt.append("like INITCAP('%" + searchText + %')"); PreparedStatement ps = ...

Good JDBC Book + IDE

235 byte By e_kueh at 2007-9-18
I am going after 2 birds with one stone.Does anyone know a good JDBC book that also comes with decent IDE?I ready for more advance JDBC stuff. I need a good JDBC book for reference/instruction.Thanks.

how to inser data in database through programming

166 byte By samreengul at 2007-9-18
hiif some one try to insert data directly in the data base that was displayed through programming then how can database will be updatedbye