COMP230 W7 Database EReport1 Essay

п»їStudent Term ____________________________ Day _____4/21/13________ VBScript Database Problem Lab Survey

Task 5: Write and Run Repository Query Plan 1

In this circumstance, we need to problem the Computer data source to determine which computers should be replaced. The decision will be based on the CPU speed, Range of Processors and the size of hard Drive.

Inside the space provided in your Research laboratory Report document, paste the modified VBScript program as well as the RUN.

In the table cellular below, insert your ComputerReplace. vbs Plan '========================================================================== ' NAME: ComputerDatabase. vbs

'

' PUBLISHER: jlmorgan,

' PARTICULAR DATE: 10/22/2011

'

' REVIEW: Use thirty-two bit ODBC Microsoft Gain access to Driver

'

'========================================================================'

recordsStr = " "

sqlStr = " SELECT Computer system, Room_Num, Acceleration, Num_CPUs, OS_Type, HDD_Size FROM Computers WHEREVER Num_CPUs = 1 OR Speed < 2 . you OR HDD_Size < three hundred ORDER BY SIMPLY Room_Num" dataSource = " provider=Microsoft. EXPERT. OLEDB. 12. 0; " _

& " data source=C: \Scripts\Computers. accdb"

Collection objConnection sama dengan CreateObject(" ADODB. Connection" )

objConnection. Open up dataSource

Established objRecordSet sama dengan CreateObject(" ADODB. Recordset" )

objRecordSet. Available sqlStr, objConnection

objRecordSet. MoveFirst

' Screen Headers

recordsStr = " Computer Room_Num" & _

" Acceleration Num_CPUs OS_Type " & _

" HDD_Size" & vbCrLf & _

" ============================================================" & _ " =============================" & vbCrLf

Perform Until objRecordSet. EOF

recordsStr = recordsStr & objRecordSet. Fields. Item(" Computer" ) & _ vbTab & pad(objRecordSet. Areas. Item(" Room_Num" ), 5) & _ vbTab & objRecordSet. Domains. Item(" Speed" ) & _

vbTab & objRecordSet. Fields. Item(" Num_CPUs" ) & _

vbTab & pad(objRecordSet. Areas. Item(" OS_Type" ), 25) & _ vbTab & objRecordSet. Areas. Item(" HDD_Size" ) & vbCrLf objRecordSet. MoveNext

Loop

objRecordSet. Close

objConnection. Close

WScript. Indicate recordsStr

function pad(ByVal strText, ByVal len)

pad = Left(strText & Space(len), len)

end Function

Inside the table cell below, paste the personal pc RUN out of your ComputerReplace. vbs Program

How many Computer systems will be replaced due simply to CPU Acceleration < 2ghz? 4

How many Pcs will be changed due just to Number of CPUs = you? 2

How many Computer systems will be substituted due only to HDD Size < three hundred? 2

How many Computer systems will be substituted due to a couple of or more causes? 8

Activity 5: Publish and Operate Database Issue Program two

In this situation, we need to up grade our company pcs based on the Operating System and the amount of memory. We wish to ensure that all Fedora 10 machines are upgrade to Fedora 16 and all Windows XP machines happen to be upgraded to Windows 7. If we find any personal computers with just 2 GIGABYTE of storage, we can upgrade the memory to 4 GB.

In the stand cell listed below, paste the ComputerUpgrade. vbs Program recordsStr = " "

sqlStr = " SELECT Pc, HostName, Room_Num, OS_Type, Recollection FROM Personal computers WHERE 'OS_Type=(‘Fedora 10') OR PERHAPS OS_Type=(‘Windows XP') OR Memory=2' ORDER BY OS_Type" dataSource = " provider=Microsoft. _ DESIGN. OLEDB. doze. 0; " _

& " info source=c: \Scripts\Computers. accdb"

Arranged objConnection sama dengan CreateObject(" ADODB. Connection" )

objConnection. Available dataSource

Set objRecordSet sama dengan CreateObject(" ADODB. Recordset" )

objRecordSet. Wide open sqlStr, objConnection

objRecordSet. MoveFirst

' Screen Headers

recordsStr = " Computer Room_Num" & _

" Rate Num_CPUs OS_Type " & _

" HDD_Size" & vbCrLf & _

" ============================================================" & _ " =============================" & vbCrLf

Perform Until objRecordSet. EOF

recordsStr = recordsStr & objRecordSet. Fields. Item(" Computer" ) & _ vbTab & pad(objRecordSet. Areas. Item(" HostName" ), 5) & _ vbTab & objRecordSet. Domains. Item(" Room_Num" ) & _

vbTab &...

Popular

 Baroque and Rococo Skill Periods Dissertation
Baroque and Rococo Skill Periods Dissertation

The Extraordinaire Art time is labeled by many because Early Baroque, High Baroque, and Later Baroque intervals. The Rococo Art time is often considered part of the Late Baroque…...

 The Eden Alternative Study Paper
The Eden Alternative Study Paper

п»ї The Eden Alternate The Eden Alternative is a fascinating and relatively new viewpoint that has had an enormous effect on nursing homes and long term care features…...

 Operative Record: Laparoscopic Appendectomy and Placement of Right Reduced Quadrant Drain Essay
Operative Record: Laparoscopic Appendectomy and Placement of Right Reduced Quadrant Drain Essay

PRACTICAL, EFFECTUAL REPORT CASE 2 Sufferer Name: Benjamin EngelhartAge: 46DOB: 10/5/----Sex: M ID Number: 112592 Time of Entrance: 11/14/---- Particular date of Procedure: 11/14/---- Acknowledging…...

 Macbeath Composition
Macbeath Composition

" Shakespeare's Macbeth invites us to go into the world of a person driven on by serious ambition and tortured by simply regret” Create a response to this…...