Wednesday, July 29, 2009

How to get data from Firebird database using MS SQL Server stored procedure

In solving one of the tasks (рассчет автокредита) I needed an opportunity to perform stored procedure of SQL Server 2005, to receive data from the FireBird database.

Typically stored procedure in T-SQL can not do this, so I wrote a stored procedure in C#, which receives the necessary data to the DataTable(s), from where then method SqlContext.Pipe.SendResultsRow, passing a string SQL Server.
Here is the example: