PC Review


Reply
Thread Tools Rate Thread

Accessing .Net components from SQL Server..

 
 
H S
Guest
Posts: n/a
 
      14th Jul 2004
Hi all,
Has anybody tried doing this?? I followed this article to the T, but still
have problems in the last step..
When I try the last step (as shown below) I get a "Invalid Class String"
....this tells me for some reason my VB6 wrapper didnt get registered..
I tried physically registering it and it shows up in the registry.

Any and all help appreciated!

Thanks
HS


DECLARE @comHandle INT
DECLARE @retVal INT
DECLARE @errorSource VARCHAR(100)
DECLARE @errorDescription VARCHAR(100)
DECLARE @helloString VARCHAR(200)

EXEC @retVal = sp_OACreate 'HelloDNA.Class1', @comHandle OUTPUT
IF (@retVal <> 0)
BEGIN
EXEC sp_OAGetErrorInfo @comHandle, @errorSource OUTPUT, @errorDescription
OUTPUT
SELECT @errorSource, @errorDescription
END


http://www.sqljunkies.com/Article/C5...A342CAAAB.scuk


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      14th Jul 2004
* "H S" <(E-Mail Removed)> scripsit:
> Has anybody tried doing this?? I followed this article to the T, but still
> have problems in the last step..
> When I try the last step (as shown below) I get a "Invalid Class String"
> ...this tells me for some reason my VB6 wrapper didnt get registered..
> I tried physically registering it and it shows up in the registry.


Are you sure you are talking about VB.NET? If not, consider turning to
one of the microsoft.public.vb.* groups.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
 
Reply With Quote
 
Bob
Guest
Posts: n/a
 
      14th Jul 2004
Look in microsoft.public.sqlserver.programming for the thread "Using DLL's".
The answer is basically, "don't do it".

In summary, accessing a DotNet assembly from SQL Server is possible but
also:

1. not simple
2. not supported
3. dangerous

HTH,
Bob

"H S" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
> Has anybody tried doing this?? I followed this article to the T, but still
> have problems in the last step..
> When I try the last step (as shown below) I get a "Invalid Class String"
> ...this tells me for some reason my VB6 wrapper didnt get registered..
> I tried physically registering it and it shows up in the registry.
>
> Any and all help appreciated!
>
> Thanks
> HS
>
>
> DECLARE @comHandle INT
> DECLARE @retVal INT
> DECLARE @errorSource VARCHAR(100)
> DECLARE @errorDescription VARCHAR(100)
> DECLARE @helloString VARCHAR(200)
>
> EXEC @retVal = sp_OACreate 'HelloDNA.Class1', @comHandle OUTPUT
> IF (@retVal <> 0)
> BEGIN
> EXEC sp_OAGetErrorInfo @comHandle, @errorSource OUTPUT,

@errorDescription
> OUTPUT
> SELECT @errorSource, @errorDescription
> END
>
>
>

http://www.sqljunkies.com/Article/C5...A342CAAAB.scuk
>
>


 
Reply With Quote
 
H S
Guest
Posts: n/a
 
      14th Jul 2004
Yes Herfried : I am talking about VB.Net classes. Here's the article that
describes how to do it.
http://www.sqljunkies.com/Article/C5...A342CAAAB.scuk

Bob: Looking at the article I thought it was pretty staright forward..
Is there another way of doing this or that I can't use DLLs in SQL server
at all?? This doesn't seem plausible.

Thanks
HS



"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> * "H S" <(E-Mail Removed)> scripsit:
> > Has anybody tried doing this?? I followed this article to the T, but

still
> > have problems in the last step..
> > When I try the last step (as shown below) I get a "Invalid Class

String"
> > ...this tells me for some reason my VB6 wrapper didnt get registered..
> > I tried physically registering it and it shows up in the registry.

>
> Are you sure you are talking about VB.NET? If not, consider turning to
> one of the microsoft.public.vb.* groups.
>
> --
> Herfried K. Wagner [MVP]
> <URL:http://dotnet.mvps.org/>



 
Reply With Quote
 
Bob
Guest
Posts: n/a
 
      14th Jul 2004
It looks like the article you refer to was written more recently than when I
last looked into the matter, so maybe it's OK to do, sorry I don't have any
specific advice on the problem you're having since I won't test it. Just
remember (you probably know this already) that you can crash SQL Server
itself if your DLL throws any unhandled exceptions; considering what you're
trying to do (regardless of method) is essentially a hack, I wanted to relay
to you a Word Of Caution.

Bob

"H S" <(E-Mail Removed)> wrote in message
news:O%(E-Mail Removed)...
> Yes Herfried : I am talking about VB.Net classes. Here's the article that
> describes how to do it.
>

http://www.sqljunkies.com/Article/C5...A342CAAAB.scuk
>
> Bob: Looking at the article I thought it was pretty staright forward..
> Is there another way of doing this or that I can't use DLLs in SQL server
> at all?? This doesn't seem plausible.
>
> Thanks
> HS
>
>
>
> "Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > * "H S" <(E-Mail Removed)> scripsit:
> > > Has anybody tried doing this?? I followed this article to the T, but

> still
> > > have problems in the last step..
> > > When I try the last step (as shown below) I get a "Invalid Class

> String"
> > > ...this tells me for some reason my VB6 wrapper didnt get registered..
> > > I tried physically registering it and it shows up in the registry.

> >
> > Are you sure you are talking about VB.NET? If not, consider turning to
> > one of the microsoft.public.vb.* groups.
> >
> > --
> > Herfried K. Wagner [MVP]
> > <URL:http://dotnet.mvps.org/>

>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing components on other pages CJ Microsoft ASP .NET 3 9th Dec 2005 03:20 PM
Accessing Remote Components =?Utf-8?B?TWFyY2VsbyBDLg==?= Microsoft ASP .NET 1 30th Oct 2005 01:36 AM
Accessing .NET components from Dreamweaver? =?Utf-8?B?aW5ldG11Zw==?= Microsoft ASP .NET 2 28th Feb 2005 01:35 PM
Accessing MTS Components in ASP.net Application(OS- Windows2000 Server) Raghunath Microsoft Windows 2000 Deployment 0 13th Sep 2003 12:23 PM
Re: Accessing components on a form codewriter Microsoft C# .NET 4 6th Aug 2003 02:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:04 PM.