insert 1 « Operation « Java Database Q&A





1. Java Large database inserts    stackoverflow.com

I have a database in which I need to insert batches of data (around 500k records at a time). I was testing with derby and was seeing insert times of about ...

2. Buffering db inserts in multithreaded program    stackoverflow.com

I have a system which breaks a large taks into small tasks using about 30 threads as a time. As each individual thread finishes it persists its calculated results to the ...

3. Java : Insert query-Exception    stackoverflow.com

I have a doubt regarding database operation.I have one insert query that should run for 10 times. the loop starts and inserted 4 or 5 val while inserting 6th, the ...

4. Check for duplicates in database before inserting    stackoverflow.com

I need to check in database if record already exist before I insert into table. I have two tables, one that I insert data and one log table that is referenced ...

5. This query seems to insert null for Module_Code instead of value in dropdown choice    stackoverflow.com

I'm new to wicket. I have a table called students2modules with 2 fields: Stud_Username,Module_Code which links students to modules taken. I want to register a student as taking a particular module. ...

6. Database insert in a many to many relationship.Dumb question    stackoverflow.com

Hy .my problem is that i have a many to many relationship into a database , which is mapped with a table between the two tables.lets just say that i have ...

7. Inserting Queries into a RDBMS from a Java Application    stackoverflow.com

If we would like to insert 10,000 rows of data into a RDBMS from our Java application, I assume a simple way to do so would be to use a while ...

8. jdbc4 - how to insert money type?    stackoverflow.com

I faced an interesting problem as... I have MSSQL (2005) table A which contains money type column; the thing is I want to insert value to this column with T-SQL procedure ...

9. insert/update db using single function in play framework    stackoverflow.com

I'm using Play framework, I want set a value for a field through model class. I have a model package models;

import javax.persistence.*;
import java.sql.*;
import java.sql.Blob;
import javax.sql.*;
import java.math.*;
import java.util.*;
import java.util.Date;

import play.db.jpa.*;

@Entity
@Table(name="tblrecord")
public class Tblrecord extends ...





10. DBUnit not cleaning and insert the database after every method, so test are not independent    stackoverflow.com

I have a test for a DAO class, I use DBUnit to create and populate the database (using an in-memory derby). I am in problems when testing the dao update method because ...

11. Using custom objects in JDBC insert statment    stackoverflow.com

I'll copy past a part from the mule website guide:

  <jdbc:query key="outboundInsertStatement"
              value="INSERT INTO TEST (ID, TYPE, ...

12. Insert into Star Schema efficiently using JDBC    stackoverflow.com

I have star schema model in which Server Table contains information about server name. Information Table contains information that I want for specific server. And Actual Data Table contains information about ...

13. Applet to insert data to my database    bytes.com

stmt.executeUpdate("INSERT INTO CUSTOMER VALUES ('" + cust.custFirstName + "', '" + cust.custSecondName + "', '" + cust.custPhoneNum + "', '" + cust.custEmailAdd + "', '" + cust.custStreet ...

14. Form data is not inserted in DB when running the script    jmeter.512774.n5.nabble.com

Hi All, I Recorded the Script using Badboy.In this script i uploaded 1 jpg file and 2 word documets and 1 pdf file.Then i exported the script in to jmeter.It is running sucessfully with out errors but Data is not Inserting in the DB. Jmeter log file shwing like this. Is there any problam with jmeter.engine.StandardJMeterEngine: Continue on error jmeter.engine.StandardJMeterEngine: Starting ...

15. multiple inserts with JDBC sampler    jmeter.512774.n5.nabble.com

I have the need to setup some data in my DB to run tests against. I'd prefer that my JMeter test plan do this. The problem I am having is that I need to insert 20-50 rows before I can start my tests, but I can only seem to insert one row at a time with the JDBC Sampler (as ...

16. Regarding insertion of Japanese charachters in UTF-8 database    coderanch.com

Hi Can some one send me the code to insert Japanese data retrieved from a JSP page having shift-jis charset into an UTF-8 oracle database I am interested in finding how do i convert the Japanese form data from Shift-JIS to UTF-8 i tried the following : byte [] hibytes = ((String)request.getParameter("text_713")).getBytes("Shift_JIS"); initParameter = new String(hibytes, "utf-8"); out.println(initParameter); but it does ...





17. Insertion Of Data    coderanch.com

Okay, this topic is about 4 years old, but I'm going to answer it anyway. The reason the executeQuery() is not producing a result set is because you're making an update, not pulling information with a query. You should use the executeUpdate() method with your update when you are creating a table or inserting data. The executeUpdate() method returns an int, ...

18. Problem while inserting decimal numbers    coderanch.com

Originally posted by Anil Sable: [...] when we use OCI drivers for weblogic , it inserts decimal value with junk. Eg. decimal number is .981 it is inseriting as .981000000231 This is not junk. It is a simple fact of life that floating point numbers have limited precision in any implementation, including Oracle's. Most numbers cannot be represented in floating point ...

19. Inserts using addBatch() and executeBatch()    coderanch.com

I've been using the stmt.addBatch() and stmt.executeBatch() statements to do multiple inserts in a table. We've recently converted our driver from Eda to DB2 and done upgrades to DB2. Since then, the stmt.addBatch() and stmt.executeBatch()statements are not working and give me Null Pointer Exceptions. Does anyone know anything about this or do you know how to get around it? I'd appreciate ...

20. inserting null values in the backend using enterprise beans    coderanch.com

you can insert null values as given by DAYANAND BURAMSHETTY but what is the use of inserting a null value.. In general, EJB recommends entity beans(both CMP and BMP)to insert a primary key value using ejbCreate and update it in ejbStore. We can also use stateless beans for executing DML statements and complex transactions. So please tell me the scenario that ...

21. Multiple insert into database    coderanch.com

Hi, I am trying to insert multiple values into multiple tables at a single instance.I have a HTML form and Servelt that connects me to the MSAccess database . i have 4 different tables in the database.and i want to enter the values in the form to these tables in a single submit button click. i tried doing Statement st = ...

22. Insert French in Domino through JDBC    coderanch.com

Originally posted by Edwin Wong: Dear all I have no idea about how to insert French to Domino R5 through JDBC 1.0 I have tried to use the setUnicodeStream() method in the preparedStatement class. However, the result is empty when I used Domino Client to open the record. I seems that I just insert an empty string into domino. * setUnicodeStream() ...

23. Problem when inserts data    coderanch.com

Hi One thing you could try is trimming the String variable before sending it to the DB via JDBC (use the trim() of the String class). May not make any difference, but just a thought... The first thing, as always, is to figure our WHERE this behaviour is taking place (i.e. is it in the Java code, the JDBC call, the ...

24. Insert Problem ! Please Help !    coderanch.com

25. Insert Query Not working    coderanch.com

Hi all, I am working with jsp and backened MSacess. I am not able to insert into database, but other than that i am able to perform all other operations on my database. I am encountering the following error nad i am not able to figure out why.I will really be thankful if some can answer me. java.sql.SQLException: [Microsoft][ODBC Microsoft Access ...

26. inserted data lost!    coderanch.com

28. NON-English chars become "???" when inserting data    coderanch.com

Hi, I am trying to insert Hebrew characters into a VARCHAR column in a MSSQL Server 7.0 database. I am using the JdbcOdbcBridge on jdk1.3.01_1 w/ win2000. It does not want to accept the characters... All Hebrew character become "???" (question marks). I tried to set a Properties object with charSet property set to "ISO-8859-1" (which supports Hebrew). Another trial was ...

29. Inserting data which contains quote from Java Program    coderanch.com

Hello, I am writing a Java program which needs to insert names, which may contain commas, single quotes (') and so on. Currently I have a line which states as follows: "INSERT INTO TBNAMES VALUS ('clientNumber', 'name');" It is throwing an error when the name contains a single quote (ORA-00917 : missing comma) Then I changed the code as follows: "INSERT ...

30. INSERT Issue    coderanch.com

I am trying to insert some data into an Access DB. Here is my sql statement. Statement st = conn.createStatement(); ("SELECT * FROM PhoneList WHERE State = '"+state+"'"); Iterator i = phoneSet.iterator(); while (i.hasNext()) { String number = i.next().toString(); String sql = "INSERT INTO PhoneList VALUES(\""+state+"\",\""+number.substring(1,4)+"\",\""+number.substring(5, number.length())+"\")"; st.executeUpdate(sql); } st is an object of Statement. I get this error message [Microsoft][ODBC ...

31. Problem inserting a single quote (')    coderanch.com

I am having this problem with JDBC ... Using INSERT INTO statement i want to insert a row in my database and the variables that contain data might contain a single quote (') within them ... whenever i use a single quote in any of the text feilds that are to be inserted in the database i get an error i.e ...

32. INSERT problem    coderanch.com

Padraig There is nothing wrong with the syntax of the statement although there might be some underlying problem. Try t find out some more about the error: System.out.println(e.getSQLState()); System.out.println(e.getErrorCode()); System.out.println(e.getMessage()); You could have a column name spelled wrong or be trying to insert the wrong type of data into a column. It might be looking for a semi-colon at the end ...

33. retrieve autonumber value of last insert    coderanch.com

i am making inserts to multiple tables, the first of which generates an autonumbered id which the other tables use as a foreign key. to get the value of the autonumbered id, i am using the SQL server property: "select @@identity" which returns the last autonumber id inserted. my question is: how do i ensure that the database (or table) is ...

34. Inserting null using setInt    coderanch.com

35. Insert with '    coderanch.com

public String escapeSingleQuotes( String input ) { StringBuffer escaped = new StringBuffer(); for ( int i = 0; i < input.length(); i++ ) { if( input.charAt( i ) == '\'' ) //if needs escaping { escaped.append( '\'' ); //add an extra escape character } escaped.append( input.charAt( i ) ); } return escaped.toString(); }

37. Problem of using setCharacterStream method to insert varchar2 data in ORACLE816    coderanch.com

hi,i have a problem in inserting into table in oracle816.My OS platform is win2000 Simplified.I want to insert some chinese simplified data in Oracle.Although data are inserted,but the result data is not in proper order.For example,the sql "insert into table(A,B,C) values ('a....','b....','c....')" can be executed successfully.But the result data in table is A B C --------- a............ b.......... c....... NOTE:"u........" means ...

38. inserting values    coderanch.com

39. INSERT    coderanch.com

hello could someone give me some help please i have a GUI with 20 textfields, which i want to be able to insert to the SQL database. the first 10 textfields are where the user will name his tables to insert to. the next 10 textfields is where the user names the columns to insert to. But what i want is ...

40. Referential Integrity: How 2 INSERT the professional way ?    coderanch.com

hi everyone ! i have two database tables A and B, and B references A. B links A to another table (m:n relationship of A to this other table). now if i insert a row into A and one in B referencing this newly inserted row, i want to keep the referential integrity between A and B. a problem occurs, though, ...

41. Insert    coderanch.com

I'm struggling with inserting a record to Access 97 database. The java program should insert one record into a table in a Access database which is allowed to read and write. I set up ODBC in the control panel->Data Sources(ODBC). The program seems working. However, it doesn't insert the record into that table. Strangely, when I use the same program, just ...

42. problem in insertion of data    coderanch.com

There is a problem with the updates of existing records that can be solved using a dummy query (query something small and don't to do anything with the results). But from my experience and a couple other posts I've found (with massive searching) there is also a bug in the odbc driver for Access that comes with Windows 2000 service pack ...

43. Inserting nulls    coderanch.com

Hai Java Gurus, The question may soud dumb but ...let me ask. I have a varchar column and in my program I have a string variable that take sdata from thr textbox in the gui and inserts it into database. My problem is if th evalue in text box is empty then it is entering empty string into database. I want ...

44. URGENT:::Can DML operation "insert" works inside a PL/SQL stored function ?    coderanch.com

Hi , I am working with PL/SQL functions . I am trying to execute a simple "insert" statement through a PL/SQL function. It is giving following error: "Cannot perform DML operations inside a query". It works fine with a PL/SQL procedure. here is a sample code: ----------------------------------------------- create or replace procedure testQueryProc(myarg number) is begin testQuery(1); end testQueryProc; / create or ...

45. one more question about inserting data    coderanch.com

I am trying to take data from a GUI and enter it into the table in my database. This is working except for some formatting problems. I am able to get the string info just fine but when I try to get the float values and dates all I get is zeros. Here's what I have: String Symbol = tfSymbol.getText(); String ...

46. Why it is not INSERTing    coderanch.com

47. multiple inserts with @@identity    coderanch.com

help! help, someone! here's the problem mssqlserver.jar (jdbc2.0 compat) t1 is auto-increment primary-key. part of t2's primary key is the @@identity of t1 i want to say: PreparedStatement(" insert into t1 (a,b,c,d) values (?,?,?,?); insert into t2 (e,f,g) values (@@identity,?,?) ") when i run through and set ?1,?2,?3,?4 i'm ok when i set ?6,?7 and ask jdbc to do this for ...

48. Problem while reading from db after inserting ..Urgent    coderanch.com

Hi All, I am having some new problem in our office,its working in some m/c and its not working in some m/c with the same settings (same jar,ear and war files) the problem I am facing is - when I am trying read data from database after inserting, its giving following error in some m/c alone.can anyone help me in the ...

49. getting the last inserted value    coderanch.com

this is more of a database question... im using sybase ASA... theres an 'autonumber' field in a table, that is used as primary key. i have a method that should insert the given data into this table, and return the value of this primary key. can any one tell me if theres some sql function that'll get me the last inserted ...

50. Inserting Data!!!    coderanch.com

hi folks, i have been able to all operations like update, delete but Insert. the program control reaches the point where it has a statment that inserts data into a table in Oracle9i, then the program keeps hanging there. Do anyone has this kind of problem? what do you thing is going on there? thanks.

51. Data not insert.    coderanch.com

Friends, I am using redhat linux 7.3, Tomcat 4.1, mysql comes with redhat linux 7.3. my programe works well, but don't insert any record Here is my code <%@ page import="java.sql.*"%> <%@ page import="java.util.*"%> Student Registration Form <% String name = request.getParameter("name"); String gender = request.getParameter("gender"); String age = request.getParameter("age"); ...

52. Inserting Picture    coderanch.com

Hello, In oracle there is a data type wich the data rangs is(if i am not wrong) 4GB. Those are called 'Large objects'. By having a table which consists of these type of object you can have pictures in the orcale database. I think you can use the 'PrepapredStatement' to do this. Write the sql statement you want for example, Connection ...

53. NullPointerException on INSERT    coderanch.com

54. Problems Inserting Info. into Access DB    coderanch.com

I am trying to insert information into an Access Table. If I hard code the variable information in, the insert statement works but when I assign the value of the ID number into a method to get a new number the update statement does not work. Any ideas?? This is the method I am calling to do the update: WITHOUT CODE ...

55. problem with insertion..    coderanch.com

iam not being able to insert the values in database.. here is the code for insertion: <%@ page language="java" import="java.sql.*,java.io.*" %> <% Connection con=null; java.sql.Statement stmt=null; String paper_title=""; String co_authors=""; int year=0; String citation=""; String username=""; String xy=(String)session.getAttribute("y"); if(xy==null) xy="jasu"; username= request.getParameter("username"); paper_title=request.getParameter("paper_title"); co_authors=request.getParameter("co_authors"); year=Integer.parseInt(request.getParameter("year")); citation=request.getParameter("citation"); out.println(username); System.out.println("the value of paper is:"+paper_title); System.out.println("the value of co is:"+co_authors); System.out.println("the value of citation ...

56. inserting checkbox in database    coderanch.com

58. How Do I Insert .... ?    coderanch.com

I have a table 'message' in the MySQL database. To make it simple; say, I have three fields in that table: thread_ID, thread_topic, and thread_body. The thread_ID field is AUTO_INCREMENT; therefore, I do not insert any value into that column. The value of that field starts with 1 when the first row is inserted. Now, I have the values for thread_topic ...

60. insertion    coderanch.com

Iam not able to figure out clearly how to insert values from the following form to the database. I have a form where i have used javascript for selecting dynamically the values.. like from the course ..list if the user selects UG courses..the courseno and the course_titles get displayed..stored all the values in arrays.. wanted to know how will i insert ...

63. Insert in JDBC    coderanch.com

Well, using a procedure that is compiled by your SQL server is one step. Using the JDBC batch method is a good step, too. As for the commit, that would depend on whether it is called for or not. If the inserts are all truly atomic, then yes--each commit needs to be called. (See the batch method for specifics though). If ...

64. A simple insert....    coderanch.com

....wrecking my head! Anybody got any clue as to why it isn't working? When I click the submit button the page displayed only contains the text used in the finally bit. "DisConnecting From Server.... " It doesn't even get this far: out.println("

You're log was added

"); Here's my full code: <%@ page language="java" import="java.sql.*, oracle.jdbc.*" contentType= "text/html; charset=windows-1257" %> ...

65. Inserting Auto Number    coderanch.com

You can't insert an explicit number since it is an AutoNumber field. To insert a new row, either leave the autonumber field out of the insert clause OR set it to a value of 0. In either case, Access will automatically insert the next number. For example, if you have table "table1" with columns: (id autonumber) and (field1 char(20)), then here ...

66. insert query problem    coderanch.com

Hi trying to insert the data in tabel st_stocks . In the following code retrieving all the items from Item Master and selecting offices for the item for which entry is not there in stock table. For all such offices trying to insert the data. strQuery = "select office_id from sy_offices where office_id not in(select purchase_office_id from st_stocks where item_id=" + ...

67. Simoltaneous insertion giving problem.    coderanch.com

Hi All, Im using WAS5.1. My application is inserting in 2-3 tables (of ORACLE 9i) . But Im Im hitting the URL continously then a fraction of mili seconds time then the screen is hanged. Im using DATA Source of WAS and its inbuilt connection pooling. (DAO) Database classes are called by the Stateless session beans. And One DAO Factory to ...

68. how to insert 2 values togther in db?    coderanch.com

HI, I have 2 functions which insert values from Arraylists into database in each column. When I execute this way, values are inserted 1 after another in transactions. I want to do similar to: eg: insert into PAT_STUDENT_SURVEY(ANSWER1, ANSWER2) values('5','0'); how do i do with my code? // Inserting StudentBvalues in db table for (int i=0; i > StudentBvalues.size(); i++) { ...

69. updateString() is inserting numbers    coderanch.com

70. Example of INSERT    coderanch.com

Originally posted by Jyothi Lature: Hi, This could be achieved using Prepared Statement in JDBC API. ACtually, its no differnt from using this from any other db: PreparedStatement ps2 = conn.prepareStatement( "INSERT INTO TBL_NAME(COL1,COL2,COL3,COL4,COL5) "+ "VALUES(?, ?, ?, ?, ?)"; -- this sample code sets the values of dynamic parameters -- to be the values of program variables ps2.setInt(1, var1); ps2.setInt(2, ...

71. Inserting OLE Object in Access DB    coderanch.com

72. Insert and MoveFirst    coderanch.com

73. inserting into a database problems    coderanch.com

well, I have been looking at this for hours (which could be one of my problems) and I can't seem to work out what is wrong. i have a servlet that is supposed to be entering some data for me (this is a web-based application by the way). the program works fine, shows no errors, but when I go to check ...

74. Auto Format data for Insert into...?    coderanch.com

Hello, My application read log files in which each line = record of table. Field separator in log files is pipe sign, so data is something like this: String Field 1 | Integer Field 1 | Date Field 1 | String Field 2...... When I transform this into "Insert into..." statement I have make my SQL like this: Insert into abc ...

75. problem in inserting data    coderanch.com

hiii i have a problem here, which couldnt be solved. i have written a JDBC program, i am trying to insert data into a table. when i compile the program, i get the output. it also gives me the number of rows inserted too. but when i open my data base i couldnt see any data inserted, i dont understand where ...

76. insert query not working    coderanch.com

77. insertion into the database    coderanch.com

sir the code below is to enter the items in the database but it is giving the error .......of null................. <%@ page import="java.sql.*" %> JAI SHRI RAM <% String url = "jdbc dbc:lala" ; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection conn = DriverManager.getConnection(url,"",""); Statement st = conn.createStatement(); for(int i=1 ; i<=13 ; i++) { String skill_type = request.getParameter("skill_type"+i); ...

78. insert into spesific database    coderanch.com

79. how to call procedure in to java for inserting values    coderanch.com

If you are using ref cursor.....even more detail codes for your reference! [CODE] Here is the Procedure CREATE OR REPLACE PACKAGE Report AS TYPE Report_Cursor IS REF CURSOR; PROCEDURE SELECT_REPORT ( report_Id IN number, get_Id OUT Report_Cursor, get_User OUT Report_Cursor, get_Room OUT Report_Cursor, get_Equipment OUT Report_Cursor, get_Department OUT Report_Cursor); CREATE OR REPLACE PACKAGE BODY Report AS PROCEDURE SELECT_REPORT ( report_id IN ...

80. Can't insert Data    coderanch.com

81. Code hangs on a preparesStatement insert    coderanch.com

I am experiencing very weird behaviour. My Java Code is trying to perform a PreparedStatement.executeUpdate() performing a insert. But when it get to the PreparedStatement.executeUpdate() it seems to hang on the insert, as if the table is locked. As I understand it a insert does not lock a table. The table does not seem to be locked as I can insert ...

82. Terminated Insert.    coderanch.com

sure.. String filename= request.getParameter("textfield2"); String id= request.getParameter("textfield"); FileReader file = new FileReader(filename); BufferedReader fileInput = new BufferedReader(file); String text; ArrayList words = new ArrayList(); words.add("Waist_Full"); words.add("Center_Trunk_Circumference_Back_Coutoured"); final int NUMBER_OF_LINES_IN_FILE = 300; int pos_equal=0, length = 0; for(int counter=0;counter < NUMBER_OF_LINES_IN_FILE;counter++) { text = fileInput.readLine(); if(text.startsWith("MEASURE")) { pos_equal = text.indexOf('='); length = text.length(); String colname = text.substring(8,pos_equal); // to read the string ...

83. insert into method    coderanch.com

Hi there, i've written the following method to pass values and insert them into a database, it doesn't seem to work, can't see where i've gone wrong..thanks public String insertcomplainantDetails (Connection cn, String Companyname, String Complainantsurname,String Complainantname, String Complainantdepartment, String Complainantlocation, String Complainantaddress, long Complainantidnum, long Complainantoraclenum,long ComplainantTelnum ,Date ComplainantDate) { PreparedStatement pstmt=null; DBconn=cn; String insertSQL; int rows=0; StringBuffer strBuff = ...

84. values not been inserted    coderanch.com

import java.sql.*; public class DataWriter { privateConnection con; privateStatement statement; privateResultSet rs; private DataReader reader; public DataWriter() throws Exception { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("jdbc :-o dbc:login","",""); statement=con.createStatement(); } public void addNode(String nodeName,String nodeDesc) throws Exception { statement.execute ("insert into auth values('" + nodeName + "','" + nodeDescription + "')"); con.commit; } public static void main(String argv[]) { new DataWriter().addNode("a","b"); } this code dodent ...

85. IDENTITY_INSERT    coderanch.com

86. Multi-row insert    coderanch.com

Hi Thanks all but still i couldn't figure out any thing.First i'll tell you my problem. I am having a table say xx with three fields say x is primary key, i want to isert 2 or more row into the table ,if that rows are found( value for primary key is not in the table) i have to insert these ...

87. Insert Query with auto-incrementing key    coderanch.com

I have a users table with a primary key "id" that is set to auto-increment for new insertions. So a new user gets automatically assigned the number of users + 1 for their id. How does my query from my jsp change in this situation? Do I just leave off the "id" field in the Insert query?

88. Trouble with INSERT    coderanch.com

I am writing a utility using JDBC to make scripts to import data from one db to another. But some of the text contains chars that mess up the SQL statement, specifically '\'', '\n', and '\r'; Right now, I am stripping them out of the row text. Can I wrap them somehow so I don't lose the data? I am using ...

89. Data Insert Problem    coderanch.com

90. Problem With Inserting    coderanch.com

So here's the code: /* * JDBCTest.java * * Created on February 15, 2006, 3:04 AM * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ import java.sql.*; /** * * @author Brandon Tom */ public class JDBCTest { /** Creates a new instance of JDBCTest */ public JDBCTest() { } ...

91. problem with INSERT query with RETURNING clause    coderanch.com

Hi, "DECLARE Id number(9);BEGIN INSERT INTO CPS1_MY_EWALLET ( EWALLET_ID) VALUES (CPS1_MY_EWALLET_1SQ.NEXTVAL) RETURNING EWALLET_ID INTO Id; END;" Thats not standard SQL; you've mixed in a database-proprietary procedural langauage. The JDBC standard only guarantees support for plain SQL, one statement at a time, although a vendor's driver/DB may allow more... Also, the "RETURNING..." clause is not standard SQL either. I'm guessing that you're ...

92. Problem about inserting into database    coderanch.com

Hi,guys I am doing B/S architecture student management system, the first step is to send the register info which is input in the html form by the user into the sql server database, but neigher the empty record in db nor the IE can't show the register info. My source code is as follow: (user_reg.html)

93. Data truncation while inserting.    coderanch.com

Hi all. I am trying to insert a query which has a very lengthy string of char 380. We are using Prepared Statement to carry out the insert. I am able to retrieve the full string from the JSP and display it in Action class.When i checked the logs the value passed contains the full string of 380char.But when i try ...

94. cannot insert datetime type    coderanch.com

The column value is dateTime, I use string to insert the data because it didn't work with with the value coming from rs.getDate() This is the output from my console success selecting data no1628151308255020050901000153496 no2nRn2Rkp4c01 no3 1 no4 2 no5 2005-09-01 00:01:22.0 no6 2005-09-01 00:46:24.0 no 7 6281513082550 no8 20 no9 101 no10 10801 no11 0 no12 1 no13 1590 no14 ...

95. data insert problem    coderanch.com

96. Before insert Trigger    coderanch.com

97. concatenating the values before inserting    coderanch.com

This shouldn't be that hard to do, I'm guessing that you're tripping over some minor syntax errors in building your string. The chances of those types of errors drop substantially if you use PreparedStatement instead of Statement; you break the problem up from building one complex dynamic String into writing one essentially static SQL statement, and then building each value correctly. ...

98. inserting sequences values    coderanch.com

Hello Ranchers.. i'm doing a project in JSP oracle.. and in some point i used a sequence.. for generating the id.. when i create a new user.. with name "aravind" and password "prasad" the valeues are inserted in to the table as ---------------------------------------------- id name password ---------------------------------------------- 1 aravind prasad ---------------------------------------------- when i create another user the id will be 2 ...

100. simple insert drives me nuts    coderanch.com

Hi all, The end-user sees a JTable gui with some data/elements in it (title, name). He can have them ordered in any way he wants, when he clicks save and later comes back to the table he should see the order he previously saved. For some reason, when he clicks save the first time the data is saved in the ...