473,324 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Invoking .NET dll from SQL

We have an existing ASP application that is supported by SQL 2000. We plan
on utilizing a third party COM object for which we'll be writing a wrapper.
Initial thoughts are to write a VB6 COM wrapper around the 3rd party dll but
we'd like to start a slow migration to .NET; I say slow because we don't
have funding to rewrite the entire app so we're hoping to use .NET on all
new functionality if possible.

We'll be calling the object from our SQL box by using the sp_OA* system
stored procedures offered by SQL Server to invoke the wrapper, which in turn
will invoke the 3rd party COM object. I know this can be accomplished if we
write our wrapper in VB6 but my ultimate question is... Can I do the
following?

1. Inovoke a .NET dll from SQL stored procedure sp_OACreate

2. Change a property in a .NET dll using sp_OASetProperty

3. Execute a subroutine within the .NET dll using sp_OAMethod

4. Pass property values from the .NET dll to the 3rd Party COM object.

5. Update property values in the .NET dll based on output from the COM
object

6. Get the updated property values from the .NET dll using sp_OAGetProperty

I'm not sure how I might better explain the process... any insight is
greatly appreciated.

Ken
Jul 21 '05 #1
2 1559
Ken Sturgeon wrote:
We have an existing ASP application that is supported by SQL 2000. We plan
on utilizing a third party COM object for which we'll be writing a wrapper.
Initial thoughts are to write a VB6 COM wrapper around the 3rd party dll but
we'd like to start a slow migration to .NET; I say slow because we don't
have funding to rewrite the entire app so we're hoping to use .NET on all
new functionality if possible.

We'll be calling the object from our SQL box by using the sp_OA* system
stored procedures offered by SQL Server to invoke the wrapper, which in turn
will invoke the 3rd party COM object. I know this can be accomplished if we
write our wrapper in VB6 but my ultimate question is... Can I do the
following?

1. Inovoke a .NET dll from SQL stored procedure sp_OACreate

2. Change a property in a .NET dll using sp_OASetProperty

3. Execute a subroutine within the .NET dll using sp_OAMethod

4. Pass property values from the .NET dll to the 3rd Party COM object.

5. Update property values in the .NET dll based on output from the COM
object

6. Get the updated property values from the .NET dll using sp_OAGetProperty

I'm not sure how I might better explain the process... any insight is
greatly appreciated.

Ken


Well -- at the very worse, you could always create a console app that
calls the dll for you.

Then you can use the Execute Command stored procedure, run the console
..exe and pass the variables for properties that you want to update as
command line arguments.

Jul 21 '05 #2
That's a great idea Adlai. If I do that would I be able to get the output
params passed back to the calling stored procedure? I don't believe that
would be possible. Fortunatly in this particular situation I may have a work
around for that issue.

Thanks very much for your time and your insight.

Ken

"Adlai Stevenson" <ms*****@boy.towel.spam> wrote in message
news:yZ*****************@newsread2.news.pas.earthl ink.net...
Ken Sturgeon wrote:
We have an existing ASP application that is supported by SQL 2000. We plan on utilizing a third party COM object for which we'll be writing a wrapper. Initial thoughts are to write a VB6 COM wrapper around the 3rd party dll but we'd like to start a slow migration to .NET; I say slow because we don't
have funding to rewrite the entire app so we're hoping to use .NET on all new functionality if possible.

We'll be calling the object from our SQL box by using the sp_OA* system
stored procedures offered by SQL Server to invoke the wrapper, which in turn will invoke the 3rd party COM object. I know this can be accomplished if we write our wrapper in VB6 but my ultimate question is... Can I do the
following?

1. Inovoke a .NET dll from SQL stored procedure sp_OACreate

2. Change a property in a .NET dll using sp_OASetProperty

3. Execute a subroutine within the .NET dll using sp_OAMethod

4. Pass property values from the .NET dll to the 3rd Party COM object.

5. Update property values in the .NET dll based on output from the COM
object

6. Get the updated property values from the .NET dll using sp_OAGetProperty
I'm not sure how I might better explain the process... any insight is
greatly appreciated.

Ken


Well -- at the very worse, you could always create a console app that
calls the dll for you.

Then you can use the Execute Command stored procedure, run the console
.exe and pass the variables for properties that you want to update as
command line arguments.

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Prasad | last post by:
We are invoking a SQL DTS component (lets call it Comp1) built by us in another component (Comp2).Comp1 was built by creating the DTS package using the SQL DTS wizard and then saving it as a VB...
6
by: Patrick | last post by:
Following earlier discussions about invoking a .NET class library via ..NET-COM Interop (using regasm /tlb) at...
4
by: Joanna Carter \(TeamB\) | last post by:
I am trying to invoke an event using reflection. ////////////////////// public class Test { public event EventHandler NameChanged; public void CallEvent() {
25
by: MuZZy | last post by:
Hi, I'm currently rewriting some functionality which was using multithredaing for retrieving datasets from database and updating a grid control. I found that the grids (Infragistics UltraGrid,...
2
by: shanmani | last post by:
Hi, I am developing a .NET application which will invoke the methods from different COM / .NET DLLs. While invoking methods from .NET DLLs, I am encountering the following error. I have also...
0
by: Haxan | last post by:
Hi, I have an unmanaged application that converts a function pointer to a delegate and then pass this as a parameter(delegate) to a managed function which then invokes it. Currently Im able to...
0
by: balaji krishna | last post by:
Hi, I need to handle the return set from COBOL stored procedure from my invoking Java program. I do not know, how many rows the stored proc SQL fetches.I have declared the cursor in that proc, but i...
2
by: =?Utf-8?B?SmltIE93ZW4=?= | last post by:
Hi John, Hopefully this post will find its way back to you - or perhaps be answered by someone else. As I mentioned in my last post on the earlier portion of this thread, changing the...
1
by: imranisb | last post by:
Hi, I apologies if this type of question was posted before. I am invoking internet explorer and open the HTTPS website from my c# application like this: System.Diagnostics.Process proc =...
6
by: John O'Flaherty | last post by:
Hello. I have an ms acess database that I use to track my mp3 files. I have included code that lets me select and play files by invoking an mp3 player (Winamp). This is done by using visual basic...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.