Home » Archives for Ilias Tsagklis » Page 30

Author Archives: Ilias Tsagklis

Ilias is a software developer turned online entrepreneur. He is co-founder and Executive Editor at Java Code Geeks.

Determine if a ResultSet is updatable

With this example we are going to demonstrate how to determine if a ResultSet is updatable. An updatable ResultSet is a table of data representing a database result set, that can be updated by others. In short, to determine if a ResultSet is updatable you should: Load the JDBC Driver, using the forName(String className) API method of the Class. In ...

Read More »

Updatable ResultSet Example

In this example we shall show you how to use an updatable ResultSet. An updatable result set allows modification to data in a table through the result set. To create an Updatable ResultSet and use its capabilites for data updates in a database one should perform the following steps: Load the JDBC driver, using the forName(String className) API method of ...

Read More »

Determine if a ResultSet is scrollable

This is an example of how to determine if a ResultSet is Scrollable. Checking if a ResultSet is scrollable or not implies that you should: Load the JDBC driver, using the forName(String className) API method of the Class. In this example we use the MySQL JDBC driver. Create a Connection to the database. Invoke the getConnection(String url, String user, String ...

Read More »

Getting column names of a database table

With this example we are going to demonstrate how to get the column names of a database Table. In short, to get the column names of a database Table you should: Load the JDBC driver, using the forName(String className) API method of the Class. In this example we use the MySQL JDBC driver. Create a Connection to the database. Invoke ...

Read More »

Update a table row example

In this example we shall show you how to update a Table row. To update a Table row one should perform the following steps: Load the JDBC driver, using the forName(String className) API method of the Class. In this example we use the MySQL JDBC driver. Create a Connection to the database. Invoke the getConnection(String url, String user, String password) ...

Read More »

List all database table names

This is an example of how to list all database table names. Listing all database table names implies that you should: Load the JDBC driver, using the forName(String className) API method of the Class. In this example we use the MySQL JDBC driver. Create a Connection to the database. Invoke the getConnection(String url, String user, String password) API method of ...

Read More »

Create table example

With this example we are going to create a table in Java. In short, to create a table you should: Load the JDBC driver, using the forName(String className) API method of the Class. In this example we use the MySQL JDBC driver. Create a Connection to the database. Invoke the getConnection(String url, String user, String password) API method of the ...

Read More »

Delete table row example

In this example we shall show you how to delete a table row in Java. We can use the Statement and PreparedStatement API to delete a row in a table, according to how frequently a delete query is executed. To delete a row into a table one should perform the following steps: Load the JDBC driver, using the forName(String className) ...

Read More »

Check database Batch support

This is an example of how to check if a database supports batch updates. Checking if a database supports batch updates implies that you should: Load the JDBC driver, using the forName(String className) API method of the Class. In this example we use the MySQL JDBC driver. Create a Connection to the database. Invoke the getConnection(String url, String user, String ...

Read More »

Get JDBC Connection parameters

With this example we are going to demonstrate how to get the JDBC Connection parameters. In short, to get the JDBC Connection parameters you should: Load the MySQL JDBC driver, using the forName(String className) API method of the Class. Get the Driver Instance. Invoke the getDriver(String url) of the DriverManager, using the database URL. Get available properties, using the getPropertyInfo(String ...

Read More »