KALASHNICOV
IS-IT--Management
Hi all,
i have been using thread329-1266538 to help me but i seem to have hit a wall.
I have written a client log on script, that starts a particular group of computers in the AM. This then writes to a table in SQL when a PC starts.
My next stage is to use data from a view i have created, that will email the systems dept a list of any machines that dont start up..
Im stuck!!!!!!!
Set CON = CreateObject("ADODB.Connection")
Set RS = CreateObject("ADODB.Recordset")
c = 0
CON.Mode = adModeReadWrite
CON.Open "DRIVER={SQL Server};@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
strsql = "SELECT name, mac from computer_not_turnon"
RS.Open strsql, CON
TakeKindArray = RS.GetRows(, , Array("name", "mac"))
RS.Close
Dim iRowLoop, iColLoop
For iRowLoop = 0 to UBound(TakeKindArray, 2)
For iColLoop = 0 to UBound(TakeKindArray, 1)
Response.Write(TakeKindArray(iColLoop, iRowLoop))
SQLStmt.CommandType = 1
Set con.ActiveConnection = cn
RS.Open strsql
TakeKindArray = RS.GetRows(, , Array("name", "mac"))
RS.Close
MsgBox "done"
Do Until rs.EOF
RS.Movenext
Loop
"
Function SendEmail(personfrom, personto, subject, body)
Dim objemail
Set objMessage = CreateObject("CDO.Message")
objMessage.From = personfrom
objMessage.To = personto
objMessage.Subject = Subject
objMessage.Textbody = body
objMessage.Configuration.Fields.Item(" = 2
objMessage.Configuration.Fields.Item(" = "ip"
objMessage.Configuration.Fields.Item(" = 25
objMessage.Configuration.Fields.Update
objMessage.Send
End Function
Do Until rs.EOF
MsgBox name + Mac
RS.Movenext
Loop
i have been using thread329-1266538 to help me but i seem to have hit a wall.
I have written a client log on script, that starts a particular group of computers in the AM. This then writes to a table in SQL when a PC starts.
My next stage is to use data from a view i have created, that will email the systems dept a list of any machines that dont start up..
Im stuck!!!!!!!
Set CON = CreateObject("ADODB.Connection")
Set RS = CreateObject("ADODB.Recordset")
c = 0
CON.Mode = adModeReadWrite
CON.Open "DRIVER={SQL Server};@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
strsql = "SELECT name, mac from computer_not_turnon"
RS.Open strsql, CON
TakeKindArray = RS.GetRows(, , Array("name", "mac"))
RS.Close
Dim iRowLoop, iColLoop
For iRowLoop = 0 to UBound(TakeKindArray, 2)
For iColLoop = 0 to UBound(TakeKindArray, 1)
Response.Write(TakeKindArray(iColLoop, iRowLoop))
SQLStmt.CommandType = 1
Set con.ActiveConnection = cn
RS.Open strsql
TakeKindArray = RS.GetRows(, , Array("name", "mac"))
RS.Close
MsgBox "done"
Do Until rs.EOF
RS.Movenext
Loop
"
Function SendEmail(personfrom, personto, subject, body)
Dim objemail
Set objMessage = CreateObject("CDO.Message")
objMessage.From = personfrom
objMessage.To = personto
objMessage.Subject = Subject
objMessage.Textbody = body
objMessage.Configuration.Fields.Item(" = 2
objMessage.Configuration.Fields.Item(" = "ip"
objMessage.Configuration.Fields.Item(" = 25
objMessage.Configuration.Fields.Update
objMessage.Send
End Function
Do Until rs.EOF
MsgBox name + Mac
RS.Movenext
Loop