Schuedule triggering

B

Benny

Is there a way I can call VB.net code from a stored procedure? I need to
schedule a sql job (stored procedure) and in the logic of the stored
procedure, I need to call vb.net code to generate a pdf document.

Your support will very much helpful Thanks in advance.

Regards,
Benny
 
J

Jason Brown [MSFT]

Yes, there's an extended stored proc called (IIRC) xp_cmdshell which can
call external code, though there are ome caveats on its use which you should
be able to find in the SQL documentation

there's also a way of instantiating COM objects from SQL with another XSP,
the name of which has totally escaped me - I'll look it up shortly.
 
A

Aaron [SQL Server MVP]

sp_OACreate, etc. I give examples of using them to create a CDO.Message
object in http://www.aspfaq.com/2403

Not exactly the best use of resources, FWIW. Some insiders (e.g. Euan) have
alluded to some serious memory issues with some of these tools. Besides,
sp_OA* are for instantiating regular old COM objects, not .NET. I think the
OP will have to go the route of xp_cmdshell and all the security
implications that come with it.
 
J

Jason Brown [MSFT]

Thanks Aaron


--
Jason Brown
Microsoft GTSC, IIS

This posting is provided "AS IS" with no warranties, and confers no rights.
 
A

Aaron [SQL Server MVP]

Is there a way I can call VB.net code from a stored procedure? I need to
schedule a sql job (stored procedure) and in the logic of the stored
procedure, I need to call vb.net code to generate a pdf document.

Have you considered going the other way? Have the stored procedure log an
entry into a queue table. Have a windows scheduled task wake up every
minute, fire up a VB.Net app, it checks the database and if there's anything
in the queue, it creates the PDF document(s).

A
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top