View Single Post
  #6 (permalink)  
Old January 14th, 2009, 03:20 PM
dparsons dparsons is offline
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Not sure why that would happen. Set your code up to look like this:

asp Code:
<%
Option Explicit
Dim rsqdb
Dim strConnection, conn
Dim raction_summary
set Conn=Server.CreateObject("ADODB.Connection")
set rsqdb = server.CreateObject("ADODB.Recordset")
set raction_summary =server.CreateObject("ADODB.Recordset")
Conn.open "Provider=sqloledb;Server=myserver;Initial Catalog=qdb;UID=Reports;PWD=;"
set rsqdb = conn.Execute ("use msdb select distinct j.Name as JobName, j.description as JobDescription, h.run_date as LastStatusDate,  " _
& " case h.run_status  " _
& " when 0 then 'Failed'  " _
& " when 1 then 'Successful'  " _
& " when 3 then 'Cancelled'  " _
& " when 4 then 'In Progress'  " _
& " end as JobStatus " _
& " from sysJobHistory h, sysJobs j " _
& " where j.job_id = h.job_id and h.run_date =  " _
& " (select max(hi.run_date) from sysJobHistory hi where h.job_id = hi.job_id) " _
& " order by JobStatus ")


if not rsqdb.EOF then response.write rsqdb("name")

set rsqdb = nothing
set conn = nothing


%>

hth.
-Doug
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================
Reply With Quote