Scheduled task
I am trying to figure out how to call a page of code to update a datagrid on my site, using windows task manager. Can i schedule a page with an .asp extension or must i save it as an .exe?
I am using the code below to update the database at a certain time, but it wont add the record to the table. I have tried scheduling it as .asp and .exe but the table wont update. Would really appreciate any help, thanks in advance.
<%
Dim rsUsers, strUserId
Set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open "Members", objConn, adOpenForwardOnly,adCmdTable
rsUsers.AddNew
rsUsers("TraderName") = "works"
rsUsers("Password") = "works"
rsUsers("Firstname") = "works"
rsUsers("Surname") = "works"
rsUsers("EmailAddress") = "works"
rsUsers("MobileNumber") = 999
rsUsers("EmailUpdates") =True
rsUsers("SmsUpdates") = false
rsUsers("CashBalance") = 100000
rsUsers("PortfolioValue") = 100000
rsUsers("Active") = false
rsUsers.update
%>
|