Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Open TCP / IP Port and send Data in a procedure

Author  Topic 

Triffid
Starting Member

2 Posts

Posted - 2010-07-12 : 10:05:59
Hello and thanks in advance for any help...

I am in a situation where I would like to open a tcp/ip port and send some data using tsql. This port happens to be a printer and I just need to send some print data to it upon demand. I am using a development tool that is database driven and I don't have access to open this port from the application itself, so somehow sending this data from the db (or at least triggered from the db) is my best option. This procedure will need to operate in both SQL Server 2005 and SQL Server 2008 express.

Can anyone offer advice about the best way to accomplish this?

Thanks again

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-07-12 : 11:01:14
A CLR routine is going to be you're best bet in this case.
Go to Top of Page

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2010-07-12 : 11:13:26
how about xp_cmdshell? would that work as well?

<><><><><><><><><><><><><><><><><><><><><><><><><>
If you don't have the passion to help people, you have no passion
Go to Top of Page

Triffid
Starting Member

2 Posts

Posted - 2010-07-12 : 11:28:02
I would rather not use xp_cmdshell unless I have to. I'm not familiar with writing CLR routines but I have written a few programs in C#. I will try this route first, thanks
Go to Top of Page
   

- Advertisement -