473,396 Members | 1,992 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,396 software developers and data experts.

Accessing .Net components from SQL Server..

H S
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
Nov 20 '05 #1
4 1068
* "H S" <hs*****@yahoo.com> 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/>
Nov 20 '05 #2
Bob
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" <hs*****@yahoo.com> wrote in message
news:eo*************@TK2MSFTNGP12.phx.gbl...
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


Nov 20 '05 #3
H S
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]" <hi***************@gmx.at> wrote in message
news:uE**************@TK2MSFTNGP10.phx.gbl...
* "H S" <hs*****@yahoo.com> 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/>

Nov 20 '05 #4
Bob
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" <hs*****@yahoo.com> wrote in message
news:O%****************@TK2MSFTNGP12.phx.gbl...
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]" <hi***************@gmx.at> wrote in message
news:uE**************@TK2MSFTNGP10.phx.gbl...
* "H S" <hs*****@yahoo.com> 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/>



Nov 20 '05 #5

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

Similar topics

4
by: Jaydeep | last post by:
Hello, I am facing a strange problem. Problem accessing remote database from ASP using COM+ server application having VB components (ActiveX DLL) installed. Tier 1 : ASP front End (IIS 5.0) Tire...
4
by: Duncan | last post by:
It seems that controls that are in a form's ComponentTray (e.g. ToolTip, ErrorProvider) don't appear on its list of controls (FormName.Controls). Is there any way I can get hold of them?
3
by: Alex | last post by:
I'm having a problem porting an ASP solution to ASPX. In the ASP solution I'm accessing a DCOM server, create sub DCOM objects and call functions from VB script on the ASP pages. The DCOM object...
19
by: Joseph MCAD | last post by:
April 5, 2005 Does anybody know how to access these newsgroups through a newsreader? I would prefer to use Outlook Express. If you know the name of the news server and any other configuration...
5
by: RSH | last post by:
I havent been able to set a property from another class with out getting some sort of error. Can someone please tell me what I'm doing wrong here? Public Class Form1
1
by: Miku | last post by:
Hi Guies, I am new to vb.net. In my project I am using vb.net & MySql 4.0.17 as a backend. For database connectivity i have downloaded ByteFX - Mysql .net native provider. I have written the...
0
by: sonu | last post by:
I have following client side code which i have used in my asp.net project SummaryFeatured Resources from the IBM Business Values Solution Center WHITEPAPER : CRM Done Right Improve the...
0
by: John Fleming | last post by:
Hello, I am building a web application with the following components: 2 Web Servers - Windows Server 2003 - IIS 6 - .Net Framework version 2.0 - Reside in Domain A 2 Clustered Database...
4
by: Jon | last post by:
I wrote a VS 2005 C# express programme that accesses a web service. It works fine when there's a direct connection to the internet, but on two different PCs with internet access via a proxy, I get...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.