ggreen681
Posts: 53
Score: 3 Joined: 9/24/2001 From: Cleveland, OH Status: offline
|
The script is supposed to read the values of the Excel spreadsheet and list the results in the command window however it just hangs. It never returns any data. I am testing the script on XP Pro SP2 and the spreadsheet is Excel 2003 If it matters any here are the column headings in the script Server, OS, Domain, GroupName, EnvName, FileName, FilePath, FileVersion On Error Resume Next Const adOpenStatic = 3 Const adLockOptimistic = 3 Const adCmdText = &H0001 Set objConnection = CreateObject("ADODB.Connection") Set objRecordSet = CreateObject("ADODB.Recordset") objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\Temp\TestBook.xls;" & _ "Extended Properties=""Excel 8.0;HDR=Yes;"";" objRecordset.Open "Select * FROM [Sheet1$] Where Server = Server01", _ objConnection, adOpenStatic, adLockOptimistic, adCmdText Do Until objRecordset.EOF Wscript.Echo objRecordset.Fields.Item("Server"), _ objRecordset.Fields.Item("OS"), _ objRecordset.Fields.Item("Domain"), _ objRecordset.Fields.Item("GroupName"), _ objRecordset.Fields.Item("EnvName"), _ objRecordset.Fields.Item("FileName"), _ objRecordset.Fields.Item("FilePath"), _ objRecordset.Fields.Item("FileVersion") objRecordset.MoveNext Loop
_____________________________
You mean that was a PRODUCTION server?!
|