Exception « Operation « Java Database Q&A





1. Exception while executing SQL Query using JDBC    stackoverflow.com

I get an exception while executing an sql query using jdbc on NetBeans IDE. I'm able to execute the same query using Microsoft SQL Server Management Studio Express without any errors. Here ...

2. Exception in Batch Update    coderanch.com

Dear All, I am trying to execute a batch process which calls a procedure for insertion of records into database.My database is Microsoft SQL 7.0 . A Negative Array Size Exception comes while executing the program. I have tried modifying the code but everytime the exception pops up.... Can someone help me with the code. Thanks in advance...... Nivas Here is ...

3. Exceptions in Batch Update process.    coderanch.com

I am inserting millions of records using Batch update process. I mean preparedStatement and executeBatch method. for ex. when I insert 100000 records, sometimes some records fail to get inserted because the data doesn't match correctly to columns in the table. I want to capture this data into an exception table. But how do I know what was the sql error ...

4. Batch Update Exception    coderanch.com

Hi I am using batch updating (i.e. stmt.addBatch(sqlString), executeBatch(), etc.) my code is: int id = 0; String sqlStr = ""; ... ... //createNewStatement is a customize method for creating a new statement. Statement insertStmt = db.createNewStatement(); while(!(idVector.isEmpty())){ id = idVector.firstElement(); sqlStr = "INSERT INTO ids VALUES ('" + id + "')"; insertStmt.addBatch(sqlStr); } ... insertStmt.executeBatch(); insertStmt.close(); ... My question is: ...

5. What Would Cause A Method That Inserts Records To Throw An Exception?    coderanch.com

I use the MySQL database and the Tomcat 4.1.18 web server. I try to insert a record to a table message_thread in the MySQL database. The first column of that table is for the ID of each recored. I created that column (field) with INTEGER AUTO_INCREMENT. Therefore, I did not mention that field in the method that inserts records. I got ...

6. Exception in executing the query    coderanch.com

8. Batch inserts exception getting thrown..    coderanch.com

I keep getting the following error when trying to load data into a table from a file. ERROR - com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data truncated for column 'contentId' at row 64 com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data truncated for column 'contentId' at row 64 contentId in the tab delimted text file is always null (in the table it is an auto incremented field and ...

9. executeUpdate not updating and no exception thrown    coderanch.com

Using Oracle 8.1.7.4 db and Weblogic 8.1 server It's one of those problems where I can't see anything wrong with the code, but its not updating the table and its not throwing an exception either. Here's the code: daoUtil.leaseSession(); String qryUpdateMDRequestHeader = "update md_request_hdr set auth_user_id=?, "+ "auth_date=?, additional_instructions=?, pickup_instructions=?, req_pickup_date=? "+ "where customer_id=? and "+ "tracking_number=? "; params = new ...





10. Exception While Updating    coderanch.com

11. After end of result set exception while i execute the SQL query    coderanch.com

Sorry for posting the same question in same forum but i can't able to solve it.. When i execute the below code with the MySQL in JSP i got no results, but when i run the same query in MySQL console it works perfect. <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="err_login_session.jsp" %> <%@ page import="java.text.SimpleDateFormat"%> <%@ page import="java.util.Date"%> <%@ page import="com.rajk.javacode.servlets.dbmodel"%> ...

12. getting batchupdate exception while inserting recored for second time...    coderanch.com

this is code i wrote ..to connect to database and also getting filename,filedate and filesize from one folder but if i am trying to insert same records again then i am getting the error as Statements that produce resultsets are not allowed in batch comments... import java.sql.*; import java.io.*; import java.util.Properties; import java.text.SimpleDateFormat; public class DatabaseConnection{ public static void main(String[] args) ...

14. Query runs on DB but throws exception in java    dbforums.com

I'm having some trouble executing a nested sql query. It works fine when i run it on TOAD (for Oracle DB) but when I try and execute the same query from my java program it gives me an error : ORA-00923: FROM keyword not found where expected: Here is the query: Select * from(select tb1.Number, tb1.Desc, tb1.Local, tb2.Division from tb1 inner ...