Programming Tutorials

JDBC Tutorials

1. Data Access Technologies in Java

By: Lakshmi : 2023-05-04

Description: Java offers several data access technologies for connecting to various types of data sources, such as databases, flat files, and web services. Some of the popular data access technologies in Java are:


2. Getting Started with JDBC

By: Priya Mani : 2022-10-12

Description: This tutorial helps you to set up a JDBCâ„¢ development environment. This includes the following steps:


3. JDBC and Tomcat context settings

By: Norman Chap : 2022-10-07

Description: JDBC (Java Database Connectivity) is a Java API for connecting and interacting with relational databases. Tomcat is a popular web server and servlet container that can also be used to run Java web applications.


4. Import TEXT to TABLE in MSSQL

By: Fernando : 2010-04-06

Description: Use this code to import value in text into a table in MSSQL


5. TEXT datatype SPLIT in MSSQL - to solve the 8000 limit set by varchar

By: Dave : 2010-04-06

Description: I have been frustrated with the 8000 limit set by the varchar data type in MSSQL. For procedures that required text length more than 8000 character limit, MSSQL offers the TEXT datatype. However there are not as many functions that are supported for TEXT datatype. For example if you would like to split the data string which is seperated by a delimitter, then it is not easy to split the text.


6. What is Referential Integrity in databases?

By: Peter den Haan : 2008-12-27

Description: What happens when you start manipulating the records in your tables? You can edit the book information at will without any ill effects, but what would happen if you needed to delete a title? The entries in the Contribution table will still link to a nonexistent book. Clearly you can't have a contribution detail without the associated book title being present. So, you must have a means in place to enforce a corresponding book title for each contribution. This is the basis of enforcing referential integrity. You can enforce the validity of the data in this situation in two ways. One is by cascading deletions through the related tables; the other is by preventing deletions when related records exist.


7. Handling CSV in Stored Procedures

By: Balmer : 2008-08-05

Description: You have a number of key values in CSV format(comma separated values), identifying a couple of rows in a table, and you want to retrieve these rows. If you are the sort of person who composes your SQL statements in client code, you might have something that looks like this:


8. java.lang.NoClassDefFoundError and java.lang.NoSuchMethodError

By: Yolander : 2007-10-13

Description: One of the places java tries to find your .class file is your current directory. So if your .class file is in C:\java, you should change your current directory to that. To change your directory, type the following command at the prompt and press Enter:


9. Calling a Stored Procedure from JDBC in Java

By: Watson : 2007-10-13

Description: JDBC allows you to call a database stored procedure from an application written in the Java programming language. The first step is to create a CallableStatement object. As with Statement and PreparedStatement objects, this is done with an open Connection object. A callableStatement object contains a call to a stored procedure; it does not contain the stored procedure itself. The first line of code below creates a call to the stored procedure SHOW_SUPPLIERS using the connection con. The part that is enclosed in curly braces is the escape syntax for stored procedures. When the driver encounters "{call SHOW_SUPPLIERS}", it will translate this escape syntax into the native SQL used by the database to call the stored procedure named SHOW_SUPPLIERS.


10. setSavepoint and releaseSavepoint Example in Java

By: Vimala : 2007-10-13

Description: The JDBC 3.0 API adds the method Connection.setSavepoint, which sets a savepoint within the current transaction. The Connection.rollback method has been overloaded to take a savepoint argument.