Java Data Access—JDBC, JNDI, and JAXP phần 5 ppt
... follows: Connecting to database Connection successful Row Number=1, SSN: 111111111, Name: Todd, Salary: $50 00 .55 Row Number=2, SSN: 41987 654 1, Name: Larry, Salary: $ 150 0. 75 Row Number=3, SSN: 312 654 987, Name: ... DriverManager.getConnection(jdbcUrl,user,pwd); //Initialize a DatabaseMetaData object DatabaseMetaData dmd = conn.getMetaData(); //Retrieve database name and versio...
Ngày tải lên: 14/08/2014, 06:21
... 254 Executing SQL commands using rowsets 255 Fetching data from a rowset 256 Traversing data in a rowset 256 Controlling scrollable and updateable properties 257 Setting transaction levels 257 Cleaning ... ResultSetMetaData objects 1 35 ResultSetMetaData example 136 The DatabaseMetaData Interface 140 Creating DatabaseMetaData objects 141 Using DatabaseMetaData objects 141 Databas...
Ngày tải lên: 14/08/2014, 06:21
... Todd 50 00.00 19 95 09−16 100 987 654 321 John 4 351 .00 1996−12−31 50 0 868 653 391 Greg 4 351 .00 1996−12−31 50 0 123 456 789 Jimmy 3080.00 1997−09−07 400 312 654 987 Lori 2000. 95 1999−01−11 300 41987 654 1 Larry ... the database using the stream. Listing 5 5 provides an example storing and retrieving an XML file in a database. Listing 5 5: StreamingXML .java package Chapter5; im...
Ngày tải lên: 14/08/2014, 06:21
Java Data Access—JDBC, JNDI, and JAXP phần 7 ppt
... InitialContext(env); //Bind the DataSource object bindDataSource(ctx, dataSourceName); //Retrieve the DataSource object DataSource ds = null; ds = (DataSource) ctx.lookup(dataSourceName); //Open ... View and update data in disconnected environments• Take advantage of JavaBean technology, for example by using standard setter and getter methods for configuring and retrieving pro...
Ngày tải lên: 14/08/2014, 06:21
Java Data Access—JDBC, JNDI, and JAXP phần 9 pptx
... to establish a database connection. Listing 17−3: DatabaseBean .java // Java Data Access: JDBC, JNDI, and JAXP // Chapter 17 − Web Applications and Data Access // DatabaseBean .java package Chapter18; import ... Both establish a database connection, perform a database action such as a query, retrieve the resulting data, format and display the data, and perform some house...
Ngày tải lên: 14/08/2014, 06:21
Java Data Access—JDBC, JNDI, and JAXP phần 2 ppsx
... to database SSN: 111111111, Name: Todd, Salary: $50 00 .55 , HireDate: 19 95 09−16 SSN: 41987 654 1, Name: Larry, Salary: $ 150 0. 75, HireDate: 2001−03− 05 SSN: 312 654 987, Name: Lori, Salary: $2000. 95, ... the methods and properties that enable you to send commands and receive data from your database. They also define methods that help bridge data type differences between Java...
Ngày tải lên: 14/08/2014, 06:21
Java Data Access—JDBC, JNDI, and JAXP phần 4 docx
... Name: Andy Griffith, Salary: $ 750 00 Employee Id: 4, SSN: 444444444, Name: Santa Claus, Salary: $77000 .50 Employee Id: 5, SSN: 55 555 555 5, Name: Kim Harvey, Salary: $ 450 00 .50 Goodbye! Custom Data ... "(4,Emp _Data( 444444444,’Santa’,’Claus’,77000 .50 ))"); stmt.executeUpdate("INSERT INTO Emp_Records VALUES" + " (5, Emp _Data( 55 555 555 5,’Kim’,’Harvey...
Ngày tải lên: 14/08/2014, 06:21
Java Data Access—JDBC, JNDI, and JAXP phần 6 doc
... with JAXP Chapter 19: Accessing Data with Enterprise JavaBeans 203 Chapter 13: Accessing Enterprise Data with JNDI In This Chapter Introducing naming and directory services• Understanding the Java ... Enterprise Data with JNDI Chapter 14: Using Data Sources and Connection Pooling Chapter 15: Understanding Distributed Transactions Chapter 16: Working with JDBC Rowsets Chapter...
Ngày tải lên: 14/08/2014, 06:21
Java Data Access—JDBC, JNDI, and JAXP phần 8 pdf
... 111111111, Name: Todd, Salary: $50 00 .55 , HireDate: 19 95 09−16 SSN: 41987 654 1, Name: Larry, Salary: $ 150 0. 75, HireDate: 2001−03− 05 Chapter 16: Working with JDBC Rowsets 259 Figure 17−3: Example of ... Applications 290 SSN: 312 654 987, Name: Lori, Salary: $2000. 95, HireDate: 1999−01−11 SSN: 123 456 789, Name: Jimmy, Salary: $3080. 05, HireDate: 1997−09−07 SSN: 987 654 321, Name:...
Ngày tải lên: 14/08/2014, 06:21
Java Data Access—JDBC, JNDI, and JAXP phần 10 pdf
... CustomerBean .java import java. io.Serializable; import java. util.Enumeration; import java. util.Vector; import javax.ejb.*; import javax.naming.InitialContext; import javax.naming.NamingException; import javax.sql.DataSource; import ... Chapter 5, "Building JDBC Statements." DataTruncation A DataTruncation exception occurs when you attempt to write or retrieve data from the...
Ngày tải lên: 14/08/2014, 06:21