How To Insert Values in Ms Access using Netbeans or Java - Saif-u-llah

Breaking

Subscribe Us

Sunday, 21 June 2015

How To Insert Values in Ms Access using Netbeans or Java

Salam!!
Today we will learn that how we can insert values in Ms Access using java or how to connect java with Ms Access. Its Really Easy. 

Step 1

Open Your Netbeans/java and Select New project. After giving name this project,Press right click on the left most side on Source package.


 then click New Jframe Form. Now another dialog box appears like this.


Step 2

Select Lables, Text Fields and button with drag and Drop from the right most side Palette menu.
For Example I have a form of Employee with Employee Id,name and his/her Phone.


Step 3

Add Button Inert to this Form.


Step 4

Now Change the Variables Names of Textfields and Button. I wrote names like
ID= tdif
Name=tfname
Phone=tfphone
Button=btninsert
Where tf means Textfield.


Step 5


Now press double click on Insert button or press right click on the button and select Events,Action and Action performed button insert. In this way you will go to source code..


Step 6


Now Get text from Text field and Use Insert Query and multiple catches accordingly.


This is the path that you will use to connect your java with Mas Access. Remember your Query values should equal to your Ms Access tables columns...


Step 7


Now Run Your Program..




Thanks for visiting our Site..For more Question or Help you can Ask more Questions...













No comments:

Post a Comment