update 1 « Operation « Java Database Q&A





1. Update a backend database on software update with Java    stackoverflow.com

With which tool / library it is possible to update an existing database structure. On the update of the software it is also needed to change the database. Because there can ...

2. Continuous Integration: keeping the test DB schema up-to-date    stackoverflow.com

I'm setting up a continuous integration server (Hudson) to build a Java project and run the relevant unit/integration tests. Most of these tests access a database and the test data is ...

3. How do I persist data to disk, and both randomly update it, and stream it efficiently back into RAM?    stackoverflow.com

I need to store up to tens or even hundreds of millions of pieces of data on-disk. Each piece of data contains information like:

id=23425
browser=firefox
ip-address=10.1.1.1
outcome=1.0
New pieces of data may be added ...

4. Update a single object across multiple process in java    stackoverflow.com

A couple of Relational DB tables are managed by a single object cache that resides in a process. When the cache is committed the tables are updated. The DB relational tables ...

5. How to access the balance information for a mobile and update it in database through the mobile    stackoverflow.com

As a Distributor i am getting mobile recharge pack in large amount from the Mobile company.Now as per requirement the distributor recharge the customer's mobile. I need to implement an application that ...

6. Java EE Entity doesn't obtain updated database data    stackoverflow.com

I'm building an application using Java2EE, and I have several Entities including this two: Entity Product (Snippet):

@Entity
public class Product implements Serializable {
    @ManyToMany(mappedBy = "products")
    private ...

7. Automatically Updating Database Schema For Java Project's Unit Tests    stackoverflow.com

I've got a Java project that needs to populate the database with a new schema prior to executing Unit Tests. Maven is used to build the project. Unitils is ...

8. Updating a database periodically with Java    stackoverflow.com

I would like to perform updates to a MySQL database using two separate classes (that do different things) -- one doing so every 10 seconds, and the second every minute. I ...

9. problem with updating application with new data from database    stackoverflow.com

I have a web application that pulls data from the database then displays it. Now the problem I'm having is that every hour I want to do updates on the data ...





10. java multi threaded application to update DB    stackoverflow.com

I have a DB which has 100 entries need to update certain table colum entry which is dynamically requires update. Essentially all the 100 entries they collect the data from disk and update the ...

11. JDBC insert or update practice    stackoverflow.com

I need to insert a record to table if the record doesn't exist, and to update a record if the record exists in the table. Of course, I can write: p-code:

SELECT * FROM ...

12. Java Message Driven Bean(MDB) simultaneous database update issue    stackoverflow.com

I have a java batch process which publishes message processing to MQ. MDB associated with the queue processes the message. Each message will have 10 records. I need to update a ...

13. Problem in updating database (jdbc)    stackoverflow.com

I'm developing an application in which I dynamically create forms by reading data from a database. What I want is the user to be able to update or delete the database ...

14. java persistence works with reading from database, silently fails to insert / update    stackoverflow.com

I have created a simple java web (Vaadin) application project using JPA and it works for reading entities from database. When I try to use either persist() or merge(), nothing happens ...

15. DB4O database size growing on updating objects    stackoverflow.com

I've a java web server application which updates objects to the database every 10 seconds or so. I've noticed that when updating, even if no changes are applied,almost every time the ...

16. Berkley issues updating data to new value using a hash config    stackoverflow.com

I am trying to write a program that uses a Berkeley Database and i configured my database as followed :

DatabaseConfig dbConfig = new DatabaseConfig();

dbConfig.setType(DatabaseType.HASH);
dbConfig.setAllowCreate(true);
dbConfig.setSortedDuplicates(false); //tried commented this out as well

// Create ...





17. [NB 6.7] Database issues after update from NB 6.5.1    forums.netbeans.org

Hi, After switching from NetBeans 6.5.1 to NetBeans 6.7 I'm experiencing several database issues using Java DB (Derby). When opening a previous (in NB 6.5.1) available connection I now get confronted ...

18. update application database using update center    forums.netbeans.org

Hi! I have an application and I want to update the application database sometimes when I change the database (data or structure) using the update center. My database is not inside ...

19. Question about updating database    forums.netbeans.org

I have followed the below tutorial to build up my application. http://netbeans.org/kb/docs/javaee/ecommerce/transaction.html In my application, there are two table called "company" and "group". One company has many groups. Therefore, it is a one to many relationship. Firstly, I obtain the company data by : Company selected_company = companyFacade.find(companyID); where companyID is a variable and it is primary key of "company" table. ...

20. Not updating in DB    jmeter.512774.n5.nabble.com

Hi , I have recorded a script like login . and modify and save the data and logout . now i have run the script . whats my query is when i run the script the login and data saved should will be upated in DB or not ? ...

21. Update Client DataBase with data on Server    coderanch.com

I am working on a website where data is posted from 12 branch offices and viewed from head office in form of generated html reports on daily bases. The data has to remain on server for one month after which, it is to be downloaded at headquarters and the database at HQ has to be updated with this downloaded data. I ...

22. efficient way to update data    coderanch.com

Hi I want to achieve a simple functionality but in a very efficient way. let me ask using an example: I want to update the department of first 20 employees where employee manager is 'Ramesh'(say). And there are 500 employees under Ramesh and 5000 employees in the company. And employees table have following fields: Employee ID(PK), Manager name, department. How can ...

23. Updates    coderanch.com

Im having some problems using the JDBCODBC Bridge to connect to Access 97 on Win 98. The problem is that some Updates dont seem to commit to the DB. The statement executes fine, no exceptions or anything, it even produces and exception when the statement is invalid (like when it violates a prim key or foreign key constraint). But the result ...

24. Best solution to prevent unwanted database updates    coderanch.com

When a user clicks submit on a page, when nothing has changed,what would be the best and efficient solution to check for real updates. - things to consider: Business objects in question are really large and spans multiple tables, so saving previous object in session is ruled out. Column to Column check for changes before update is also ruled out. -cannot ...

25. How to update ?    coderanch.com

I want to update a column in a table through servlet. First I execute the query and display the values from table,its working fine,it is inserting values also, but not updating.In update block it generate sql exception.Below is part of code not working sql = "update book set balance = " + "'" + h + "'" + " where bookid ...

26. Db Update Question    coderanch.com

Hi FOlks, More than a JDBC q, this is really a SQL question. I hope someone out there can help me.. I have a database table, say customers, with cus_number, cus_name, cus_birthdate and cus_ssn Now, i get a flat file with the the cus_number and cus_ssn on it. Have a java program that reads it, and then I need to populate ...

27. Update Problem    coderanch.com

We have a serious problem with update. One of the control characters in one field made the sql statement to terminate and ignore the where clause and updated each and every row in the table. In the example provided, the CITY_TX column had some control characters (we don't know what that character is yet)and it updated all rows with same data. ...

28. What is wrong with this Update Query!!!!    coderanch.com

Hi Friends, This my update query and I don't understand why it gives me error!!! Please help... Thanks, Elahe PrepStmt=con.prepareStatement("update bug set values (?,?,?,?,?) where bugNumber=?"); PrepStmt.setInt(1,ID); PrepStmt.setString(2,bdesc); PrepStmt.setString(3,fixedDate); PrepStmt.setInt(4,userID); PrepStmt.setString(5,contact); PrepStmt.setInt(6,bugNumber); Error: -------- You have an error in your SQL syntax near 'values (3,'I can not delete the bug#456','2001-01-01',3,'Rick-408-778-2967') whe' at line 1

29. Invoke Java program on DB Update    coderanch.com

30. Programmatic updates in JDBC 2.0    coderanch.com

31. Update problem. Please come in    coderanch.com

I downloaded a new SQL Server2000 JDBC driver, and this problem seems solvedb, but a new problem arise. I have 5 buttons now: First, Previous, Next, Last, and Save. I write the Save button code like this: public void saveValue(){ try{ rs.updateString("Name",this.tfName.getText()); rs.updateRow(); getValue(); //getValue method show the value of field "Name" in a textField } catch (SQLException se){ se.printStackTrace(); } ...

32. What's the problem(about update)?    coderanch.com

//create table coffees query = "create table coffees(cof_name varchar(32)," + "sup_id integer," + "price float," + "sales integer," + "total integer)"; //Insert data into table coffees 1) stmt.executeUpdate("insert into coffees values('French_Rost',49,8.99,0,0)"); 2) stmt.executeUpdate("insert into coffees values('Espresso',150,9.99,0,0)"); 3) stmt.executeUpdate("insert into coffees values('Columbian_Decaf',101,8.99,0,0)"); 4) stmt.executeUpdate("insert into coffees values('Columbian',101,7.99,0,0)"); 5) stmt.executeUpdate("insert into coffees values('French_Rost_Decaf',49,9.99,0,0)"); statement 1),2),3) can execute success, three record been inserted into ...

33. how can i update jdbc for sqlserver2000 in wls6.1sp2    coderanch.com

hello i download a weblogic server6.1sp2 and binding it with my jbuilder7,when i develop a database accessing program,i use sqlserver2000,as for the jdbc driver,i use the weblogic-build-in one,that is a type-4 driver,after i config a datacource and connection pool,i found that it don't support jdbc2.0,how can i update it to jdbc2.0? otherwise i download a other microsoft jdbc for sqlserver2000 from ...

34. Update    coderanch.com

35. batchupdate is not updating 1071 updates Urgent help required    coderanch.com

Hi, I have a problem, i am reading some records from a file and updating to DB,But, if there are less number of records i am able to update and insert, but if there are large number of records then it is not updating to DB, but executeBatch() method is returning an array of int of updates, but those records are ...

36. Update of processing window    coderanch.com

37. update to database problem    coderanch.com

I could use some help on the following. I am reading up on servlets and JDBC via Java Servlet Programming by Jason Hunter. I have looked at this so long I just can't see my error, but there must be something wrong! I am trying to makeup a simple servlet example using a html form to pick up a parameter from ...

38. Database update    coderanch.com

39. WHAT is scrollable update only    coderanch.com

40. How to update a database using web forms    coderanch.com

I am not getting any error it compiles fine and even when I call the servlet it also do fine! I am checking if it works through SQL Server query program to see if did any update but nothing?? If I write a direct update without the web form the servlet updaets the database but when I tried to get a ...

41. Update with subquery    coderanch.com

I made a typo while posting here, the orginal query did have proper quotes. (I typed it by hand because field names, table names etc are generated dynamically by the code). The reason it was not working because MySQL supports subqueries only in versions 4.1 and up. The version I have is 4.0.14-nt. - Manish

42. Update or Insert    coderanch.com

I am writing a Java program to put some data into a database using Java and JDBC. In some cases (depending upon the data), I want to do an update statement because there is already a row in the database for the primary key. In other cases, I want to do an insert statement because there is no row in the ...

43. updated information about DB    coderanch.com

Hi, This is certainly different among different db systems. On Oracle, the last update time on a table is not maintained in the dictionnary One way could be to maintain a timestamp in your records, e.g. using a trigger. Or you can proceed to a log analysis, using a logminer tool. HTH - Nic

44. Updating DB using Vector    coderanch.com

Hi Stefan, Thanks a lot for the interest. I have a JSP, with the three dropdowns and also a bean to connect to the DB. Then i am able to fetch the data and populate the dropdowns from the DB. I have a servlet to take the data to the DB, after the user has selected and hit the Submit button. ...

45. update button    coderanch.com

46. insert or update???    coderanch.com

I guess this is a rocky question: I have a table with 3 elements: 1. name 2. age 3. GPA there's a gui and the user update the infomraiton on a weekly basis. the table above has no primery key. and it can contain: Dan 23 3.4 Dan 22 3.0 Gil 21 3.3 etc So, the question is this: say the ...

47. cant get it to update    coderanch.com

hi, i need help on the updating of a field in my access database from my gui but its just not updating it. is there something i am doing wrong in my code? i'll appreciate corrections heres the code qty = qtytext.getText(); total = totaltxt.getText(); rs = salesmade.executeQuery("SELECT * FROM Stock WHERE ITEM = "+'"+itemno+"'"); While (rs.next()){ salesno = itemtxt.getString(itemno); salesmade.executeUpdate("UPDATE ...

48. update query    coderanch.com

HI ALL, how do i write an update query that will iterate through all rows and change all the names in the database to reflect the first letter of their names e.g name like vernon should now appear as v after the update [ January 21, 2005: Message edited by: Bear Bibeault ]

49. Multiple updates    coderanch.com

I tried your code ... but it gave me the following error when the 2nd table statement had an error in it. javax.servlet.ServletException: General error: Warning: Some non-transactional changed tables couldn't be rolled back at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471) at org.apache.jsp.process_0005fsettlement_0005fmodule$jsp._jspService(process_0005fsettlement_0005fmodule$jsp.java:331) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:414) at org.apache.jsp.settlement_0005fmodule_0005f3$jsp._jspService(settlement_0005fmodule_0005f3$jsp.java:87) at ...

50. query for updating    coderanch.com

Hi, Is it possible to create a single query that can update 2 tables at once when executed and if it is possible, how is the syntax. below is the query i use to update the master patient table and i would like the same query to update another table. how do i add on for the other table? "update master_patient ...

51. Insert & Update    coderanch.com

Disclaimer: I'm not much of a database guy - I just know how to do some basic SQL stuff in Java w/ MySQL. I have created a table which will store user info (ie. name, address, etc.) How should I test to see if the record already exists? Should the first thing I do be a SELECT statement to see if ...

52. Update query    coderanch.com

Thanks.The column value which I m trying to modify is of type "text" and not varchar in SQL 2000.I m getting an error "DBMS returned unspecified error".PreparedStatement.setString(int,str) says: "The driver converts this to an SQL VARCHAR or LONGVARCHAR value (depending on the argument's size relative to the driver's limits on VARCHAR values) when it sends it to the database. "

53. Lock while Updating?    coderanch.com

In SQL server if the program is updating a row and at the same time if a program is trying to read that particular row which is being updated then what happens assuming that the transaction level is set to read_committed. Will there be a lock and the thread try to read that row will wait till the lock is released ...

54. Updating local DB from web    coderanch.com

I have a website that includes a database that is made up of all the members and pertinent information for my organization. It gets updated throughout the day based upon people registering their dogs and clubs with our organization. I am developing a offline application that is dependant on this information. I need to be able to pull the information from ...

55. Problem with updating values    coderanch.com

Hello, I'm writing a simple website that reads and allows entries from a MS-Access database to be updated. I have got it to work. But with the first column name 'Client_ID', I cannot seem to update this the same way as with the other column variables. All the column names are stored in an array at the top of servlet. There ...

56. Lost update problem and web apps    coderanch.com

I would appreciate advice on how to deal with the lost update problem in a web application. Suppose we have a web app in which one page lists employees and, if a user clicks on one particular employee in the list, that employee's record is retrieved from the db and displayed on another page. The user may modify some fields on ...

57. Update Pattern??    coderanch.com

Hi Ranchers, I am implementing an Update function that updates 1 or possibly multiple columns in a table. Since the function may update an unknown number of columns, what is the usual way (best practice) to implement this. For eg, should i create a function that takes a variable number of arguments, or an arraylist of name, value pairs etc. I ...

58. Update in a method    coderanch.com

Hi All I was thinking would it be a wise idea to put the code that updates the database in a method and then call that method whenever required. Same can be done for delete, etc. Parameters to the method may be like a connection ref., tablename and query string. I just wanted to know whether its a wise idea or ...

59. How can control mutiple updates    coderanch.com

Hi All I am working on ERP application . I got 10 row into one jsp page. Suppose I update one column value.When I want to save this I update all 10 rows .means UPDATE SQL runs for all 10 rows I don't want this ...I want which ever row I have update Only that row Update will fire ... How ...

60. Data Update    coderanch.com

61. Updating Problem    coderanch.com

In your query UPDATE userde set name=?,add=?,email=?,phone=? where name=? you have 5 fields(?) but in the code ps.setString(1, name); //ps.setString(2, pass1); //ps.setString(3, pass2); ps.setString(4, add); ps.setString(5, email); ps.setString(6, phone); you try to set 6 fields. try this ps.setString(1, name); //ps.setString(2, pass1); //ps.setString(3, pass2); ps.setString(2, add); ps.setString(3, email); ps.setString(4, phone); And check type compatibility. Are all of the columns in the table ...

62. Multi-Record Update    coderanch.com

Hi all - a friend of mine has run across a situation and we can't seem to find a good SQL statement to handle it. Basically, we want to update multiple records in one table with data from another table. This is what we have: Table A RecordID | FilePath | ... -------------------------------- 1 | null | 2 | null | ...

63. update problem in production    coderanch.com

64. insert before update    coderanch.com

If your database supports it, you can use a MERGE statement. MERGE is apparently a new feature in the ANSI SQL 2003 standard. So far, Oracle is the only database I know that supports it though (it's not in the docs for MySQl, Postgres, or HSQLDB, at least yet); I think it came in Oracle 9i, it's certainly present in 10g. ...

65. Database update?    coderanch.com

66. how do u do multiple updates in the database?    coderanch.com

Rita, JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "u" instead of spelling out "you" is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such ...

67. simple Update fail    coderanch.com

68. Problem with update data to database    coderanch.com

I'm trying to cycle through a series of dynamic fields and update the value to the database. But the value of the last field is the one retrived and updated to all fields in the loop. How do i solve this problem. rst2 = stm1.executeQuery("select * from students"); String subject = request.getParameter("subject"); for(int i = 0; rst2.next(); i++){ String ca1 = ...

69. how to update a list of items? design question    coderanch.com

Hi all, I have a 2 tables with the following columns: Table_A IdA, Name Table_B IdB, IdA, car_number say there's the following properties: Table_A IdA, Name 1 Toyota Table_B IdB, IdA, car_number 1 1 101 2 1 102 3 1 109 4 1 230 5 1 343 . . GUI: the data in table_b (the car_number) is given as textArea and ...

70. Updating Data Base    coderanch.com

71. How to count the updates on the database?    coderanch.com

Good day! I am uploading files on the database? Is there a way that I can count the actual number of files that I have uploaded to the database? My idea is to count the initial number of rows in the database before uploading, then after uploading, I will count again the number of rows, subtract it with the initial count ...

72. Updating Access Db **Please Help**    coderanch.com

Do you really want to have the patient details in Access? I was speaking to somebody who has maintained a hospital database yesterday and he said there were all sorts of problems caused by people downloading part of the database into Access and then updating their little parts. You end up with lots of little databases with slightly different and slightly ...

73. Solid DB update problem    coderanch.com

Dear Herman Scheltinga, Here is the java code. Please see the comments what i am getting ... System.out.println("\nPassword: " + Password + "\nuserName: " + userName); //Prints the new ones to be inserted //execute the query String getIDSQL = "SELECT id, password FROM web_user WHERE UPPER(id)=UPPER('" + userName + "')"; Statement stmnt = conn.createStatement(); ResultSet rs = stmnt.executeQuery(getIDSQL); //execute the query ...

74. Fire a trigger from an external application on database update    coderanch.com

I got this problem... and I dunno which forum to put it in. i got a Java application which will update data in a certain database table. Now when this table is updated, an external application should be called, which will pick up this data and send it to MQ. I need to know, how can i trigger this event to ...

75. Message to show database update    coderanch.com

77. Getting automatic updates from database    coderanch.com

Hi, Not sure if this is the correct place to post this, but here goes, please let me know if there is a better place for questions like this. I currently have a servlet based server using http comm's to a flash movie client, everything is currently working fine, I now need to push data from an oracle database to the ...

78. Update a database just before EXIT_ON_CLOSE    coderanch.com

I have an application that uses a JFrame. I have also used jframe.setDefaultCloseOperation(EXIT_ON_CLOSE) to handle the closing of the JFrame using the windows "X" button available on most OS's. However, what I want to happen is, if that "X" button on the title bar is click, i have to update a field in database with some additional information. Right now that ...

79. Update a DB if JVM closes.    coderanch.com

Okay, I've solved two of three issues with a db dependant app that I wrote. When a user is no longer using the app the database flags there ID with an 'N' in a field of the DB. It works if they Exit the app with button I've created, or if the use the "X" to close the window via the ...

80. Difficulty in Updating database    coderanch.com

Hi, I am new to JSP. Actually i am getting the inputs from the user in the login.jsp. Then i am updating that values in the database using SQL query an then reading those values(which was written to database) and then setting it to an attribute and passing it to another JSP which displys the datas. But when trying to do ...

81. Update my database at the same time that a foreign database does    coderanch.com

replication is a database synchronization process (in this case since it is SQL Server, it would be between two SQL Server databases. This won't work between MySQL and SQL Server). Data Transformation Services are a toolkit for ETL (extract, transformation, and load). This can work between SQL Server and MySQL. However, it isn't as simple as something that will automatically occur... ...

82. Updating DB automatically !    coderanch.com

Hi All I have a program where I'm displaying a set of names in the form of a drop-down list using HTML on the browser. At present there are few names, but in future will add more to database. Now, my problem is, even the new names should get added to the drop down list automatically, without updating the HTML. How ...

83. jdbc FOR UPDATE clause limitation    coderanch.com

Howdy - love your website... I'm having a problem with a jdbc limitation that is pretty common based on researching other posts; however I haven't been able to find a workaround or solution! Perhaps you can point me to a posting that solves this problem or help me directly. It all started out with this from the Oracle JDBC manual: FOR ...

84. Update problem    coderanch.com

hi all, I am developing a small Movie Booking system as an assignment of my degree programe. I am having a problem with updating a database with a new value. This is the coding I used to update the database. public void changePassword(String username, String password) { try { Statement statement; PreparedStatement preparedStatement; String sql = "UPDATE users SET password = ...

85. How to tackle simultaneous updates done by different user to a single webpage    coderanch.com

Hello friends, This question is about general web programming... The problem is, when 2 users opens same webpage containing CRUD table of table X Consider, User-1 at Time:t and User-2 at Time t+x Now User-1 updates screen at Time t+x+y and User-2 updates same screen at Time t+x+y+z So, User-1's update is overridden and User-1 does not know about it. I ...

86. Update the whole info in database instead of one.    coderanch.com

Hey guys, I have a problem regarding on updating in database using jsp and servlets. The problem is when I update it will update the whole records instead on the specific records I choose to update. Like I update yellow beanie color from "green to yellow". It update all the color to be the same one as well as other details ...

87. Unable to update database    coderanch.com

Hey guys I am in a desperate need of help

--------------->Why is this always in error? <% //Retrieve the id of the product selected by the user //the product id is sent via the URL as a parameter //String ItemCode; //= -1; String ProductId = request.getParameter("ProductId"); if(ProductId != null) { //Convert from string to int //ItemCode = Integer.parseInt(strId); ...

88. DROP or UPDATE    coderanch.com

Hi Aruna, just give it a try.. If you're away from a db like I'm at the moment: I think it must be a) DROP Every other statement would need something to complete it: b) at least a FROM c) the data which should be inserted d) at least SET, a column and its new value e) information what should be ...

89. Real time update from database    coderanch.com

Hello Ranchers, I am facing difficulty in achieving the following scenario. Consider we have a employee table that has firstname and lastname as its column. Employee (firstname, lastname) I am writing the data in employee table to a file using java io. So suppose if one more record is added in the employee table, then the file must be updated with ...

90. Problem in Using Update Query in PreparedStatment    coderanch.com

Hi All, I am facing a problem in Using Update query in prepared statement. I am trying to update a huge set of records by using Prepared Statement in JAVA The Code is as follows: statement5=connection.prepareStatement("update CHANNELINVENTORY set CHANNELCODE=?,LASTUPDATEON=sysdate where UPPER(ITEMCODE)=? and UPPER(SERIALNUMBER)=? "); for(int j=0;j 0 && j % 1000 ...

91. update where clause    coderanch.com

92. Update query is wrong?    coderanch.com

Hi, Im having problem with this Update query, I dont know what is wrong? I checked with sun but couldnt find any thing different. still got error! any idea? here is the code: public static void update( String PO, String A, double Value){ PreparedStatement pstmt = null; ResultSet rows ; try{ Connection con = getConnection(); StringBuilder query = new StringBuilder() ; ...

93. How to prevent a race condition between reading and updating    coderanch.com

Hi all, I am having trouble preventing a race condition in a J2EE app that accesses an Oracle database. The sequence of events goes like this: 1) My servlet receives a request. 2) The servlet checks the value of a flag stored in the database. 3) If the flag is set to 'N' then it sets it to 'Y', and performs ...

94. Update with Correlated Subquery?    coderanch.com

95. Help me in creating a Trigger for Insert and Update Options    coderanch.com

Hi Please help me in creating a Trigger . My requirement is that after insert or update on a Table , i want to fire an event . I have started this way ,but doesn't know how to fully implement this . say i have a dept table CREATE TRIGGER DepartmentTrigger AFTER INSERT ON Dept BEGIN INSERT INTO mytable VALUES("123","Kiran"); END ...

96. update query issue    coderanch.com

Hi, I have field username with datas like 5101,5102,5103 in a table "cc_dailylog". I have a list box in my jsp page which displays all these usernames. If i select more than 1 username and tried to update a campaign "Aircel" for all the username,i am unable to update. so i tried to split the username with comma and put it ...

97. Help with an update sentence within a stored procedure    coderanch.com

Hi to all! I'm trying to automatize some data cleaning through a stored procedure but i'm gettting an error message. What i want to do is pass a value that is the name column from my table to the stored procedure and so i can pass any column name but like i still don't understand very well how to define a ...

98. Preserving white space when importing and updating.    coderanch.com

I am creating a program that first reads each line of a fixed-length field document. Each line is a record, and depending on which character you are at, the values mean different things (for example, characters 1 through 20 may be an identification number). I am running into a problem when I load these through the JDBCODBC driver into SQL Server ...