Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com�s entire library of video tutorials.
You'll notice when we run our application it is displaying sample data that we entered directly into the list box. Well let's instead load data directly from the database. We'll start by removing the sample data. The sample data is now not appearing. Now let's add some sample data directly to the database. Here is an insert into SQL command that will add one line of sample data. Let's run this and commit it. Let's add another task, we'll verify that this data is now in the database table. There are now two rows. In order to load these rows we need to go back to our task class, and here we begin to implement some of the methods that we created earlier. In particular the constructor. We need to be able to load a row using it's ID. So first we'll build the SQL that will load the row. Here we've created the SQL and we are creating it as a prepared statement for the database, and we are telling it that the first parameter indicated by the question mark should expect an integer. Here we call the SQL Select using the SQL Select method and we pass in the parameter that will be bound to where the question mark is. Now we can load the result if one was found. If one was not found, then we can assume that this is a new row. Now we can assign the properties based on the database columns. Now we will be able to load a single row from the table by simply supplying it's ID, also known as the primary key. Let's verify we made no typos. And we did make one typo, let's change our parameter to match.
| Course: | Real Studio |
| Author: | Paul Lefebvre |
| SKU: | 34190 |
| ISBN: | 1-936334-77-1 |
| Release Date: | 2011-02-02 |
| Duration: | 7 hrs / 87 lessons |
| Work Files: |
Yes |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |