Article Preview
Buy Now
| PDF: |
From Scratch
Swatter Part 4
A simple bug database
Issue: 6.5 (July/August 2008)
Author: Brad Rhine
Article Description: No description available.
Article Length (in bytes): 8,090
Starting Page Number: 44
RBD Number: 6516
Resource File(s):
6516.zip Updated: Tuesday, July 1, 2008 at 11:42 AM
Related Link(s): None
Known Limitations: None
Excerpt of article text...
For the last three issues, we've been working on Swatter, our simple bug database. So far, we've written the SQL code to create our databases, we've designed our interface, and we've started tying the interface to the database.
In this issue, we'll add the code that will allow us to add issues for our projects. So, without further ado, let's get to the code.
Listing Our Issues
In MainSwatterWindow, we're going to create a new method called PopulateIssues. The method will have the job of figuring out which project is selected in ProjectBox and then filling IssueBox with that project's issues. Its code will look like this.
Dim SQL As String
Dim RS As RecordSet
Dim ProjectID As Integer
IssueBox.DeleteAllRows
If ProjectBox.ListIndex<>-1 Then
ProjectID=ProjectBox.CellTag(ProjectBox.ListIndex,0)
SQL="select entry_date, title, issue_type, severity, id from issues where project_id="+Str(ProjectID)
If SwatterDB.Connect() Then
RS=SwatterDB.SQLSelect(SQL)
If RS<>Nil Then
While Not RS.EOF
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|







