• Krushna (4/1/2009)


    RBarryYoung (4/1/2009)


    Krushna (4/1/2009)


    Please note that I'm using Adobe Acrobat 6.0 Professional and PDF Printer is installed in my system and it is set to default printer. The default port is set to My Document\*.pdf

    Have you done this on the Server also? Because that is where it is running so it would need to have these things there also.

    Yes, Now I'm working in server only.

    My system is having SQL Server 2000 (server) now.

    I've just checked

    exec xp_cmdshell 'C:\PrintToPDFConsole.exe'

    But I'm getting the output

    NULL

    and the exe does not run.

    Shall I need to configure something? Please tell in detail.

    I cannot tell you anything in detail because the problem is with your PrintToPDFConsole program and it's environmental requirements, so I am just guessing here.

    When I have faced problems like this in the past, here are the steps that I have taken:

    1) Modify your PrintToPDFConsole.exe to always return to the console a detailed status description. If it failed, then it should return the error number, error message, line number, etc. AND if it succeeds (or thinks that it has), it should also say that: what it printed and to where. This is crucial to debugging any problems, because right now for instance you are getting nothing back and thus have no idea where the problem might be.

    2) Logon the the server's console (Workstation or Remote Desktop), open a DOS window and execute your PrintToPDFConsole command there. Debug any problems.

    3) Next, still from a console logon, use SSMS (Management Studio) to connect to SQL Server, and from a query window run your sp_ExecuteSql command. Debug and/or report any problems back to us.

    4) Now, still from the console, run your stored procedure and debug and/or report any problems back to us.

    5) Now open a query window from desktop and execute the sp_ExecuteSql command again. Debug and/or report any problems back to us.

    6) Finally run your stored procedure as you intend it to run. Debug and/or report any problems back to us.

    If or when you do report any problems back to us, be sure to indicate which of these steps you were one.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]