Download presentation
Presentation is loading. Please wait.
Published byAnne Dawson Modified over 9 years ago
2
The Story so far System split into layers – maintainability & re-use Database – queries, tables, rows, columns & parameters Range of objects allowing us to control different parts of the computer using their methods & properties Variables – RAM Controls – Interface DataConnection class – database Introduced a lot of coding concepts, assignment, sequence, selection, validation, functions, parameters to name a few
3
Overview of Driving Test 2
4
How do we Manipulate a List of Data?
5
Array Lists Our list of data… Fred Wilma Barney Betty The code… Dim Attendees As New ArrayList Attendees.Add("Fred") Attendees.Add("Wilma") Attendees.Add("Barney") Attendees.Add("Betty")
6
The Count Property Dim Attendees As New ArrayList Dim ItemCount As Integer ItemCount = Attendees.Count
7
Index Numbers Rather like house numbers Zero bound (This will drive you mad!) ValueIndex Fred0 Wilma1 Barney2 Betty3
8
RemoveAt Method ValueIndex Fred0 Wilma1 Barney2 Betty3 Attendees.RemoveAt(2) Which record will be removed?
9
Changing a List Entry What will the following do? Attendees.Add("Fred") Attendees.Add("Wilma") Attendees.Add("Barney") Attendees.Add("Betty") Attendees.Item(2) = "Bamm Bamm"
10
Data Tables We said all of that to introduce this… qry_tblAddress_SelectAll SELECT * FROM tblAddress
11
Presentation Layer Code How do we get at the results of the query?
12
QueryResults HouseNumber = MyAddresses.QueryResults.Rows(1).Item("HouseNo") Street = MyAddresses.QueryResults.Rows(3).Item("Street") AddressNo = MyAddresses.QueryResults.Rows(0).Item("AddressNo") DateAdded = MyAddresses.QueryResults.Rows(3).Item("Active") CountyCode = MyAddresses.QueryResults.Rows(1).Item(“HouseNo") CountyCode = MyAddresses.QueryResults.Rows(4).Item(“CountyCode")
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.