Recent update: 2008-5-9
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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.
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 ...
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 ...
all i could find where one that cost moneyany help plza free ms access driver
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 ...
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 = ...
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 ...
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 ...
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
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 ...
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?
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 ...
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:)
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 ...
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?
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 ...
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 ...
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 ...
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?
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 ...
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 ...
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 ...
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 ...
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 ...
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'. ...
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 ...
Hi, I just downloaded MS SQL Server JDBC driver, can someone tell me where can I get sample code to access data?
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 ...
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 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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 = ...
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 ...
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 ...
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 ...
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 ...
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 = ...
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.
hiif some one try to insert data directly in the data base that was displayed through programming then how can database will be updatedbye