Computer Science > Report > COMP 230 Week 7 iLab VBScript Modular Lab Report (All)

COMP 230 Week 7 iLab VBScript Modular Lab Report

Document Content and Description Below

Task 4: Write and Run Database Query Program 1 In this scenario, we need to query the Computer database to determine which computers need to be replaced. Our decision will be based on the CPU speed,... Number of Processors, and the size of the Hard Drive. In the space provided in your lab-report document, paste your modified VBScript program and the RUN. In the table cell below, paste your ComputerReplace.vbs Program. '========================================================================== ' NAME: ComputerReplace.vbs ' ' AUTHOR: ' DATE : ' ' COMMENT: Use 32 bit ODBC Microsoft Access Driver ' '========================================================================== recordsStr = "" sqlStr = "SELECT Computer,Room_Num,Speed,Num_CPUs,OS_Type,HDD_Size FROM Computers where Num_CPUs = 1 OR Speed < 2.1 OR HDD_Size <300 order by Room_Num" dataSource = "provider=Microsoft.ACE.OLEDB.12.0;" _ & "data source=Computers.accdb" Set objConnection = CreateObject("ADODB.Connection") objConnection.Open dataSource Set objRecordSet = CreateObject("ADODB.Recordset") objRecordSet.Open sqlStr , objConnection objRecordSet.MoveFirst ' Display Headers recordsStr = "Computer Room_Num " & _ "Speed Num_CPUs OS_Type " & _ " HDD_Size" & vbCrLf & _ "============================================================" & _ "================================" & vbCrLf Do Until objRecordSet.EOF recordsStr = recordsStr & objRecordSet.Fields.Item("Computer") & _ vbTab & pad(objRecordSet.Fields.Item("Room_Num"),8) & _ vbTab & objRecordSet.Fields.Item("Speed") & _ vbTab & objRecordSet.Fields.Item("Num_CPUs") & _ vbTab & pad(objRecordSet.Fields.Item("OS_Type"),12) & _ vbTab & objRecordSet.Fields.Item("HDD_Size") & vbCrLf objRecordSet.MoveNext Loop objRecordSet.Close objConnection.Close WScript.Echo recordsStr function pad(ByVal strText, ByVal len) pad = Left(strText & Space(len), len) end Function 1 COMP230_Wk7_Database_Report.docx Revision Date: 1213 [Show More]

Last updated: 1 year ago

Preview 1 out of 8 pages

Also available in bundle (1)

COMP 230 Week 1-7 iLab Report

Contains a report of COMP 230 iLab report of Week 1-7..A+ Grade Assured

By QuizGuider82 2 years ago

$19

7  

Reviews( 0 )

$10.00

Add to cart

Instant download

Can't find what you want? Try our AI powered Search

OR

GET ASSIGNMENT HELP
82
0

Document information


Connected school, study & course


About the document


Uploaded On

Jun 23, 2021

Number of pages

8

Written in

Seller


seller-icon
QuizGuider82

Member since 2 years

3 Documents Sold


Additional information

This document has been written for:

Uploaded

Jun 23, 2021

Downloads

 0

Views

 82

Document Keyword Tags

Recommended For You


$10.00
What is Browsegrades

In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Browsegrades · High quality services·