SP from VB/ADO

  • Have a stored procedure that calls xp..cmdshell to BCP a file out. This works fine thru query analyser. However when I try and trigger the stored proc thru VB and ADO, the SP triggers but no file is created? All my other procs, which are standard DMO ones are fine.

    Any ideas?

    Andy.

  • Hi for xp_cmdshell you need administrator rights.

  • already thought about that. I`ve given my application login rights to execute xp_cmdshell. When I log in query analyser can do it ok.

    Andy.

  • The login has the rights, not the application - I'd double check that you're connecting using the correct login to start with, if so, then Profile to verify the connection and subsequent execution. The login also has to have disk permissions.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Everything seemed to be executing fine in the profile. I couldn`t be bothered doing any more testing, so I triggered the proc with a different ADO connection and connection string, loggin on as administrator. all worked fine then.

    Andy.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply