Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delete column values every new day

Status
Not open for further replies.

williamsba

Programmer
Aug 3, 2000
57
US
I am trying to delete the values in one of my columns everyday at the same time. Anyone know how to do this using ASP and Access? Brad Williams
Webmaster
2d Force Service Support Group
United States Marine Corps
 
Williams,

Just create a single ASP page and store it on your web server.

deletepage.asp
Code:
<%
dim Conn
dim strSQL
dim recsAffected
dim strProvider
strProvider = 'Your Connection String or DSN

set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
Conn.Open strProvider
strSQL = &quot;UPDATE tablename SET fieldname = ''&quot;
Conn.Execute strSQL, recsAffected
Conn.close()
set Conn = Nothing
Response.Write Trim(Cstr(recsAffected)) & &quot; Records were updated.&quot;
%>
Then go to a computer that has web browser access to that website either over the internet or the intranet and just set Windows Auto Scheduler to run that page every day at xx:xx.

Let me know if you need help setting that up.

ToddWW
 
ToddWW,

I got the ASP page to work perfect. It doesnt exactly what I want it to do. Now how exactly do I get it to run on my server everyday? I thought auto scheduler wasnt on Windows NT 4.0..... Brad Williams
Webmaster
2d Force Service Support Group
United States Marine Corps
 
typo...

I got the ASP page to work perfect. It DOES exactly what I want it to do. Now how exactly do I get it to run on my server everyday? I thought auto scheduler wasnt on Windows NT 4.0.....

Brad Williams
Webmaster
2d Force Service Support Group
United States Marine Corps
 
Well, I can't speak for Windows NT 4. Sorry. But isn't there another computer that has access to that website ?? Either Win 98 or Win 2K with IE will do just fine. It doesn't have to be the actual server or any web server at all.

All you have to do is navigate to that page in a web browser and it'll perform the db update for you. And you can set autoscheduler in any Win98 or Win2K computer to load a web page.

ToddWW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top