Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2000-09-20 : 21:30:08
|
Marcos writes "Hi,
I have a table in a SQL server which have a field called expires. This field has a date the represent the data when the row must be deleted. I'm trying to create a job to run everyday searching this table and comparing the actual date with the expires date of its rows. If the date is the same the row is deleted.
Well, I tried the following VB script in the Job step:
Set AdoCon = Server.CreateObject("ADODB.Connection") AdoCon.open ("Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Northwind;Data Source=AVENGER") Set RecSet = Server.CreateObject("ADODB.RecordSet") SqlStr = "Select * from categories" RecSet.Open SqlStr, AdoCon,1,,0 Set AdoCon = Nothing Set RecSet = Nothing
But I always receive a error message:
The job failed. The Job was invoked by User AVENGER\Caldara. The last step to run was step 1 (Step 1).
I really don't know what to do...could you give some help?
I'm using windows 2000 professional and SQL server 7.0" |
|
|
|
|
|