If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Executing SQL Stored Proc sp_help_job from ASP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-02-03, 19:10
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
Executing SQL Stored Proc sp_help_job from ASP

Has anyone used the stored procedure "sp_help_job" from MS SQL Server 2000 from ASP? I've been able to successfully execute it from Query Analyzer, but when it runs from ASP, I receive the following error:

Code:
Microsoft OLE DB Provider for SQL Server error '80040e07' 
Error converting data type nvarchar to uniqueidentifier.
This is a code snippet:
Code:
Dim objDataCmd_TD_JOB, objconn_TD_JOB, objrs_TD_JOB
Set objDataCmd_TD_JOB = server.CreateObject("ADODB.Command")
Set objconn_TD_JOB = server.CreateObject ("ADODB.connection")
Set objrs_TD_JOB = server.CreateObject("ADODB.Recordset")

objconn_TD_JOB.Open strDBConn_TD_JOB
objDataCmd_TD_JOB.ActiveConnection = objconn_TD_JOB

objDataCmd_TD_JOB.Parameters.Append objDataCmd_TD_JOB.CreateParameter("@job_name", adVarWChar, adParamInput, 128, "Job_Name")

sSQL = "sp_help_job"
objDataCmd_TD_JOB.CommandText = sSQL
set objrs_TD_JOB=objDataCmd_TD_JOB.Execute ( , ,adCmdStoredProc)

objDataCmd_TD_JOB.Parameters.Delete("@job_name")
				
objrs_TD_JOB.Close
Set objrs_TD_JOB = Nothing
				
objconn_TD_JOB.Close
Set objconn_TD_JOB = Nothing
				
Set objDataCmd_TD_JOB = Nothing
"Job_Name" would be the name of my job
strDBConn_TD_JOB is defined elsewhere as my connection string

Any ideas?
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On