Showing posts with label JDBC. Show all posts
Showing posts with label JDBC. Show all posts

Sep 23, 2020

Steps to Create DSN file & JDBC Connection to MS Access

1. Steps to Create DSN file in Windows 10

2. JDBC Connection to MS Access Database in Java 8


 - How to define Data Source Name (DSN) file in Windows 10 to connect with support database using ODBC driver.

- Connecting with MS Access database in Java 8 using third party database driver called UCanAccess.

Follow me @

https://raviroza.wordpress.com/

https://raviroza.blogspot.com/

https://www.facebook.com/ravi.oza.it

https://twitter.com/raviozaIT

https://www.youtube.com/user/ravioza101

JDBC Callable Statement example

 Callable Statement to execute Stored Procedure in MySQL (Gujarati)



In this video, CallableStatment interface is used to execute stored procedure.

Methods such as execute(), executeUpdate() and executeQuery() is used to execute stored procedures.

In this example, there is also a demonstration on how to insert a record using stored procedure, as well as there is also a procedure that return the name of employee from given employee number. 

Software's used:

JDK for java library

MySql connector (Native Driver file)

Eclipse for compiling and running java code.

MySql Workbench to manage schema

Platform : Windows 10


Follow me @

https://raviroza.wordpress.com/

https://raviroza.blogspot.com/

https://www.facebook.com/ravi.oza.it

https://twitter.com/raviozaIT

https://www.youtube.com/user/ravioza101

JDBC Prepared Statement example

 Prepared Statement to execute queries for MySql (Gujarati)

In this video, PreparedStatement  interface is used to execute queries and other database operation in database.

Methods such as execute(), executeUpdate() and executeQuery() is used to execute queries related to  DDL, DML and respectively.

In this example, there is also a demonstrate regarding reading field values from user using scanner class object. There is also a result set to read values from table using select keyword in queries.

Follow me @

https://raviroza.wordpress.com/

https://raviroza.blogspot.com/

https://www.facebook.com/ravi.oza.it

https://twitter.com/raviozaIT

https://www.youtube.com/user/ravioza101

JDBC Statement example

Statement to execute queries for MySql (Gujarati)

Statement interface is used to execute queries and other database operation in database.

Methods such as execute(), executeUpdate() and executeQuery() is used to execute queries related to  DDL, DML and respectively.

In this example, there is also a demonstrate regarding reading field values from user using scanner class object. There is also a result set to read values from table using select keyword in queries.

Follow me @

https://raviroza.wordpress.com/

https://raviroza.blogspot.com/

https://www.facebook.com/ravi.oza.it

https://twitter.com/raviozaIT

https://www.youtube.com/user/ravioza101

JDBC Connection example

JDBC Connection for MySql using Type-4 Driver (Gujarati)

MySql Database Connection.

In this video, first the packages related to JDBC is imported, then the jar files related to MySql Database is attached in the project in configure build path, then the using Class.forName() the driver is loaded in memory.

After that Url, User and password are defined.

DriverManager.getConnection(url, user, password) is used to open the connection.

And, finally after the successfully opening the connection, the connection is closed to complete the connection internal processes.

MySql Connector Jar Type-4 (MySql Driver file)

https://raviroza.wordpress.com/advance-java/jdbc/

https://mvnrepository.com/artifact/mysql/mysql-connector-java


Follow me @

https://raviroza.wordpress.com/

https://raviroza.blogspot.com/

https://www.facebook.com/ravi.oza.it

https://twitter.com/raviozaIT

https://www.youtube.com/user/ravioza101

Recent Post

Launching of my new Domain

RaviROza.com