Welcome

CSS 341 -  Fundamentals of Programming Theory and Application

Most examples due to Kelvin Sung

 

CSS341        Computing and Software Systems        UW Bothell   

Here are the links to in-class demos.

Lecture Week/Date

What

For Download

Week 8 File Selector  uses either Common Dialog Box or the File Dialog from within Excel to select files for opening. FileSelector.vbs
  Example with Strings.  Gives examples of string manipulation functions, including split and filter. ExampleWithStrings.vbs
  Parse a path name after selecting file FileNameAndExtensionFromFullPath.vbs

 

Dictionary. This is a useful object (think utility tool) that the VB runtime environment gives us.

 

1.      In this example, we want to have some idea on how to use existing utilities written by others. We see that we must understand what the utility does, and must understand how to use the interface functions.

2.      Another important lesson learned in this example is: how to iterate through an existing collection of objects.

 

Dictionary.vbs

Using Dictionary: Read from a data file, process, save as text output and as a word document. Here is the data TextFile.

 

1.      OpenTextFileAsStream: now supports input and output stream. We can open an existing file for writing, and/or create a new file for writing.

2.      ReadInputStreamToDictionary: reading text into the dictionary. Since we know a little about the input format, we will perform 2 reads per input line, to parse out the 9-digit ID.

3.      SaveDictionaryToFile: Save processed dictionary into another text file. Notice, we reuse the OpenTextFileAsStream function here.

4.      CreateDocFromDictionary: Simple output routine, writing the dictionary to MS Word file. Making it look decent.

 

UseDictionary.vbs

 

Working with Database: This is a Microsoft Access database file. Let’s see what is in there. We should look at the tables, and the queries.

StudentInfo.mdb

 

ActiveX Interface to Database: This is ActiveX interface to Microsoft Access Database. ActiveX interface does not support database operations well. We need something else!

AccessCom.vbs

 

Active Data Object (ADO) interface to Database: This is an ADO interface to Microsoft Access. Notice we can open a table and work with it quite efficiently.

AdoAccess.vbs

 

More ADO Interface: Record set does not need to be limited to defined tables. We can also open a query into the database! Notice in this case, we have two record sets opened to the same database.  Working with defined queries.

AdoQueryAccess.vbs

 

ADO interface used to carry out the exercises in Class Activity 13: adds records to tables, runs predefined queries with updated tables, runs new queries defined in the script.

ADOActivity13Access.vbs

 

ADO Interface to query with a user-entered parameter.  The query MajorsFromEnteredState asks the user to enter a state abbreviation.  This script shows how to enter this information from vbs.

ADOQueryWithParm.vbs


UWB Home
18115 Campus Way NE
Bothell, WA 98011-8246

(425) 352-5000
(425) 352-5303 (TDD)

*

University of Washington, Bothell
Copyright ©2000, UWB. All rights reserved.