JDBC | Steps to connect with Database in Java | steps to connect jdbc | java program to dabase смотреть онлайн
JDBC | Steps to connect with Database in Java | steps to connect jdbc | java program to dabase
This video provide brief description about steps to connect jdbc and it will provide brief description of each every steps and what are the steps we have to use when connecting with database in java.
Steps to Connect with the Database in java:-
-------------------------------------------
1. Load and register the Driver.
2. Establish the connection between java application with the database.
3. Prepare Statement object.
4. Write and Execute SQL Queries.
5. Close the connection.
1. Load and register the Driver.
-------------------------------
--In general , Driver is an interface provided by SUN Microsystems and whose implementations classes are provided by database vendors as a part of their database software.
--To load and register Driver in our JDBC applications, we have to use the following method from class Class.
public static Class forName(String class_name)
Example:-
Class.forName("sun.jdbc.odbc.jdbcOdbcDriver");
2. Establish the connection between java application with the database.
-------------------------------------------------------------------------
--To establish the connection between java application and database ,we have to use the following method from DriverManeger class.
public static Connection getConncetion(String url, String db_username, db_password);
Example:-
Connection con=DriverManeger.getConnection("jdbc.odbc:dsnName", db_username, db_password);
3. Prepare Statement object.
---------------------------------
--as part of JDBC applications , after establish the connection between java appliction and database. we have to prepare SQL Queries and we have to transfer SQL Queries to the database Engine and we have to make Database engine to execute SQL Queries.
-- To write and execute Sql Queries , we have to use some predefined library from statement interface.
--To use the predefined library , we have to prepare Statement object.
Example:
Statement st=con.createStatement();
4. Write and Execute SQL Queries.
-- we have to use the method from Statement interface.
--executeQuery()
--executeUpdate()
--execute()
5. Close the connection.
------------------------
In JDBC applications, after the database logic , it is convention to close the Database connection for this we have to use the following method.
public void close() throws SQLException
Example:
con.close();
►Welcome to Uttamsoft online Training
►Welcome to our YouTube channel Uttamsoft
►Click here to subscribe - https://www.youtube.com/channel/UCm3S1GON2exuGPapvDkS8Yw
►Our Some Other Playlist:-
► JDBC Tutorials:https://youtube.com/playlist?list=PLCRogJ_v4BQXaX5ZaIUUojopFeSp0C7Ts
►AWT in Java(GUI):-
https://www.youtube.com/watch?v=UTm5-Pcwf3I&list=PLCRogJ_v4BQUb9igl3BNLdoLJZqy4eHsJ
►Core Java :-https://www.youtube.com/watch?v=5eGbeugtvwg&list=PLCRogJ_v4BQUvY2VK6_xC3Gwm6M6bnXPW
----------------------------------------------------------------------------------------------------------------------------------------
► Why learn java?
Java is a general-purpose, class-based, object-oriented computer programming language that was designed by James Gosling at Sun Microsystems in 1995.
Java was developed by Sun Microsystems (which is now the subsidiary of Oracle) in the year 1995. James Gosling is known as the father of Java. Before Java, its name was Oak. Since Oak was already a registered company, so James Gosling and his team changed the name from Oak to Java.
►Contact Us:-
Mobile no.:- 942 123 3453
Email-Id: [email protected]
#stepstoconnectjdbc #uttamsoft #hindi
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «JDBC | Steps to connect with Database in Java | steps to connect jdbc | java program to dabase» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.