Registration with image upload Java Jdbc(Download Source code) | Part 3
7K views
Apr 8, 2025
Registration with image upload Java Jdbc(Download Source code) | Part 3 Source code : https://www.tutussfunny.com/registration-with-image-upload-java-jdbcdownload-source-code/ Learn how to upload an image using Java and JDBC in just seconds! In this tutorial, we'll show you a step-by-step guide on how to upload an image to a database using Java and JDBC. Whether you're a beginner or an experienced developer, this video is perfect for anyone looking to learn how to upload images quickly and efficiently. We'll cover the necessary code and provide explanations to help you understand the process. By the end of this video, you'll be able to upload images in no time!.prodive free source codes. #javaswing#javaproject
View Video Transcript
0:00
hi friends welcome to tutoring channel
0:02
last class we have completed the things
0:05
of this okay browse button okay how to
0:08
work with the browse button uh let me
0:11
continue the rest of the part now what
0:13
you are going to do is I'm going to add
0:14
the record into the database okay so
0:16
first I'm going to create the database
0:18
so go to the zam open from the zam
0:21
server click start click
0:23
start click admin
0:34
this is your admin dashboard now I'm
0:36
going to create
0:38
new this one I'm going to name it as
0:44
uh
0:47
create
0:50
Osa this is a just
0:53
company okay i just give the name OSA
0:56
this is a database I have created inside
0:58
this database what are the column 1 2 3
1:02
4 5
1:04
6 seven columns you have to create along
1:06
with eight columns along with the ID we
1:09
are created eight columns this one
1:12
should be the registration
1:24
first one is
1:29
ID primary key
1:34
second is
1:35
a first
1:44
name last
1:52
name
2:00
gender male or female after that we have
2:04
to get the
2:11
department address
2:16
department
2:22
address
2:31
department salary Any
2:39
photo
2:42
right these are the column these are the
2:45
respective data types okay so we have to
2:48
we are going to create this one click
2:50
save
2:52
button it has been created successfully
2:54
you will be able to see it has been
2:56
created successfully in
2:59
myq perfect we have done the perfect
3:02
right now so what you're going to do is
3:05
now I'm going to go to
3:08
uh
3:19
using now what I'm going to do is I'm
3:22
going to go to do the save bar save part
3:26
okay before that I'm going to uh this is
3:29
our project the project we have to add
3:31
the MySQL
3:34
uh library so that is important stuff if
3:36
you have not installed the MySQL jar
3:39
file you want in order to connect our uh
3:44
zam this is our zam MySQL database along
3:48
with my net bins we need a driver that
3:52
now I'm going to type
3:54
MySQL
3:58
jar click on
4:02
this select the operating system you get
4:05
platform independent okay select as
4:08
platform independent this my download
4:12
okay you have select the operating
4:13
system which you need if you are a Mac
4:15
user you can select as a Mac okay so
4:18
here okay so here platform simply select
4:21
platform independent it will be support
4:22
everything okay platform independent
4:25
then means whatever operating system it
4:27
will be supported you can whether you
4:29
can use it Linux or Mac or anything okay
4:35
it will uh supported you but is a
4:37
special Ubuntu user you can go along
4:41
with this so I'm going to go along with
4:43
this one mys connected so I have click
4:46
no tags okay you just click no tags and
4:50
you click no tags and just start my you
4:52
click on this link you down the download
4:55
has been so I already installed I
4:58
already downloaded so I'm going to
5:00
import select the library file folder
5:02
add jar folder select this one mysql
5:06
connected open it's open
5:10
successfully now I'll be able to connect
5:12
so I'm going to go to the
5:15
source so first I'm what you're going to
5:18
implement the name space import name
5:21
import java
5:24
dot
5:27
sql dot
5:31
Now if you write the SQL all you will be
5:35
able
5:35
to write all the classes based on SQL
5:39
okay so you have to write this
5:41
connection this is a class which is
5:43
reside on the
5:45
SQL
5:47
library after we have to prepare
5:56
statement PST this all reside on
5:59
that
6:02
okay now I'm going to establish the
6:05
connection so this is the con this all
6:06
the things I will give you this
6:09
codes simply
6:20
Right
6:27
here you can see here the here we have
6:30
write it here simply of
6:38
system
6:48
Oh dot
6:54
print yeah you have to write this one
6:58
ex here whatever error you have got it
7:01
here e okay so here this is a connection
7:04
method i have read connection open and
7:06
close it so here the inside the try and
7:08
catch if the error will be occur while
7:13
the coding the catch will be getting the
7:17
catch will be saying what kind of error
7:19
you are getting on the try that's the
7:21
purpose of you are writing the try and
7:23
get very easily identify that in order
7:26
to easily identify the error okay so
7:28
where the error is coming from the
7:30
database path or driver there are so
7:33
many things okay after the use
7:35
credential and everything
7:37
So here what I did is string driver so
7:41
MySQL this is a new way to implement the
7:43
driver of MySQL mysql this driver we
7:45
have to register using com MySQL CJ JDBC
7:50
driver the URL path where you have
7:53
reside in your
7:55
uh database my database reside on the
7:58
zam is a database so your path this is
8:01
the port where my database is running uh
8:04
330 06 my database name which is a you
8:07
got to mention the name of the database
8:09
which is a OS this a name okay so this a
8:13
after that the user credential when you
8:15
install the MySQL the if you install the
8:18
zam server default without changing the
8:20
username and password default username
8:22
and password root is a username default
8:24
username password is blank this a user
8:26
credential of my SQL okay so this is
8:30
this is a very important stuff we have
8:32
to number okay this is very important
8:34
stuff this is when you register the
8:36
driver after that you have to select the
8:37
path where your database is resided
8:40
after that you have to tell them the
8:42
username and password of the dat uh your
8:45
database okay after that you have a
8:48
class for
8:49
name what is the this is the driver you
8:52
have to assign this driver this driver
8:53
you have given here class name here you
8:56
have registered or you have given the
8:58
path driver manager get connection this
9:01
is the URL your password resided this is
9:03
the user credential username and
9:04
password after this all are correct the
9:08
message is coming database connected
9:10
successfully let's run and
9:13
check okay you have to go to the console
9:16
and
9:17
check okay it's not coming because this
9:20
is a constructor you have to this one
9:21
you have copy this call inside the
9:24
constructor of the class the we how to
9:26
find the constructor the the same name
9:29
of the class the method name should be
9:31
there it's called as constructor when
9:33
the class is running the constructor is
9:36
running first okay so you have write
9:38
this call
9:40
this okay the same name of the class the
9:43
method name should be same it's called
9:45
as
9:47
con the database is correct you can get
9:50
the message of database is correct now
9:52
your programming is running successfully
9:54
keep in
9:55
Thank you for watching i'll be get it in
9:57
my next video tutorial
#Computer Education
#Java (Programming Language)
#Programming