Could somebody tell me what am I doing wrong in this script:
dim cSQL, cMessage
cSQL="exec pdf $ID$" & cstr(showingid)
DBConnector.ExecuteScalar cSQL, cMessage
if cMessage<>"" then
CreateObject("WScript.Shell").Run "cSQL"
end if
This script it’s in the back of a button which should open a pdf document, taking its location from an Sql Server 2008 database. Here I have a very simple procedure wich returns pdf’s location:
CREATE PROCEDURE [dbo].[pdf] (@ID NVARCHAR(250))
AS
SELECT URL
FROM Documents
WHERE ac_id = @ID
The procedure works fine, it’s returning the value but I think it’s a problem from CreateObject("WScript.Shell").Run "cSQL" where should be a parameter or something I guess because I get the following error:The system cannot find the file specified!
Thank you!
That was the correct script.