The Document Object – Free JavaScript Tutorials for Beginners 1.3

Posted by NosaLee in JavaScript Programming on 30-05-2012. Tags: , ,

Back to Home Previous Course Next Course
As was mentioned, document is a part of the Document Object Model. We saw a method that can be used with document, but here’s a couple more (Properties and Methods).
Properties

  • bgColor
  • fgColor
  • title
  • location
  • images
  • forms

Methods

  • open()[......]

Read More…

The Script Tag and HTML – Free JavaScript Tutorials for Beginners 1.2

Posted by NosaLee in JavaScript Programming on 30-05-2012. Tags: , ,

Back to Home Previous Course Next Course
At the moment, we have our script between the two BODY tags. And it works perfectly well here. It’s quite happy where it is. However, SCRIPTS are best kept in the HEAD section of your HTML. This is because any code in the HEAD section will be dealt with[......]

Read More…

Delete a Record from a Database – Free Java Tutorials for Beginners 13.8

Posted by NosaLee in Java Programming on 25-05-2012. Tags: , ,

Back to Home Previous Course
Deleting a row can be straightforward: Just use deleteRow method of the ResultSet:
rs.deleteRow( );
However, the Driver we are using, the ClientDriver, leaves a blank row in place of the data that was deleted. If you try to move to that row using your Next or Previous bu[......]

Read More…

Save a New Record – Free Java Tutorials for Beginners 13.7

Posted by NosaLee in Java Programming on 25-05-2012. Tags: , ,

Back to Home Previous Course Next Course
Before you can save a new record, you have to move the Cursor to something called the Insert Row. This creates a blank record in the ResultSet. You then add the data to the ResultSet:
rs.moveToInsertRow( );
rs.updateInt(“ID”, newID);
rs.updateStri[......]

Read More…

Add a New Record – Free Java Tutorials for Beginners 13.6

Posted by NosaLee in Java Programming on 25-05-2012. Tags: , ,

Back to Home Previous Course Next Course
We have three buttons that refer to new records: New Record, Save New Record, and Cancel New Record. The New Record button will only clear the Text Fields, and ready them for new data to be entered. We can also disable some other buttons, including the New Re[......]

Read More…

Updating a Record – Free Java Tutorials for Beginners 13.5

Posted by NosaLee in Java Programming on 25-05-2012. Tags: , ,

Back to Home Previous Course Next Course
The ResultSet has Update methods that allow you to update records not only in the ResultSet itself, but in the underlying database. Let’s see how it works.
Make your form a bit longer. Now add a new panel to the form. Add a new button to the panel. Chan[......]

Read More…

Move to the First and Last Records – Free Java Tutorials for Beginners 13.4

Posted by NosaLee in Java Programming on 25-05-2012. Tags: , ,

Back to Home Previous Course Next Course
Moving to the first and last records of your database is a lot easier.
Double click your First button to create the code stub. Now add the following code:
Java code to move to the First record in a ResultSet
We have no need of an IF … ELSE Statement, now. The only thing we need to do is move the Cursor t[......]

Read More…

Move Back through a Database – Free Java Tutorials for Beginners 13.3

Posted by NosaLee in Java Programming on 25-05-2012. Tags: , ,

Back to Home Previous Course Next Course
The code for the Previous button is similar to the Next button. But instead of using rs.Next, you use rs.Previous.
Return to the Design window and double click your Previous button to create a code stub.
Instead of typing out all that code again, simply copy [......]

Read More…

Database Scrolling Buttons – Free Java Tutorials for Beginners 13.2

Posted by NosaLee in Java Programming on 25-05-2012. Tags: , ,

Back to Home Previous Course Next Course
What we’ll do now is to add four buttons to the form. The buttons will enable us to move forward through the records, move back, move to the last record, and move to the first record.
So add a new panel to your form. Enlarge it and then add for buttons [......]

Read More…

Databases and Java Forms – Free Java Tutorials for Beginners 13.1

Posted by NosaLee in Java Programming on 25-05-2012. Tags: , ,

Back to Home Previous Course Next Course
In this section, you’ll create a form with buttons and text fields. The buttons will be used to scroll forwards and backwards through the records in a database table. We’ll also add buttons to perform other common database tasks. The form you̵[......]

Read More…