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

DLL register problem

I created a DLL and tried to register with regasm.exe but got error:

RegAsm: warning RA0000 : No types were registered.
I check that I got the 'no args constructor', so it should be OK.
But it still gave me this warning.

This is the cutdown version of my class:

using System;

using System.Collections.Generic;

using System.Text;

using System.Data.SqlClient;

using System.Data;

namespace DocumentClassLibrary

{

public class DocumentClassLib

{

private string _ConnectionString;

private SqlConnection _Conn;
public DocumentClassLib()

{

_ConnectionString =
"Provider=SQLOLEDB.1;server=myhost;Trusted_Connect ion=yes;database=mydb;User
ID=alan;Password=alan";

_Conn = new SqlConnection(_ConnectionString);

}

..........
Jun 28 '06 #1
4 10788
Does all dependent componens could be loaded and ComVisibleAttribute are set
correctly?

Did y tried to googling first? there are a lot of answers
http://groups.google.com/groups/sear...ed&qt_s=Search

"Alan" wrote:
I created a DLL and tried to register with regasm.exe but got error:

RegAsm: warning RA0000 : No types were registered.
I check that I got the 'no args constructor', so it should be OK.
But it still gave me this warning.

This is the cutdown version of my class:

using System;

using System.Collections.Generic;

using System.Text;

using System.Data.SqlClient;

using System.Data;

namespace DocumentClassLibrary

{

public class DocumentClassLib

{

private string _ConnectionString;

private SqlConnection _Conn;
public DocumentClassLib()

{

_ConnectionString =
"Provider=SQLOLEDB.1;server=myhost;Trusted_Connect ion=yes;database=mydb;User
ID=alan;Password=alan";

_Conn = new SqlConnection(_ConnectionString);

}

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Jun 28 '06 #2
I can now register the DLL by going to project options, set the Visible to
COM check box.

But the problem now is got a runtime error when creating an object in a
webpage using VBScript.
I tried to create a simple DLL also got the same runtime error.

"Michael Nemtsev" <ne*****@msn.com> wrote in message
news:3B**********************************@microsof t.com...
Does all dependent componens could be loaded and ComVisibleAttribute are
set
correctly?

Did y tried to googling first? there are a lot of answers
http://groups.google.com/groups/sear...ed&qt_s=Search

"Alan" wrote:
I created a DLL and tried to register with regasm.exe but got error:

RegAsm: warning RA0000 : No types were registered.
I check that I got the 'no args constructor', so it should be OK.
But it still gave me this warning.

This is the cutdown version of my class:

using System;

using System.Collections.Generic;

using System.Text;

using System.Data.SqlClient;

using System.Data;

namespace DocumentClassLibrary

{

public class DocumentClassLib

{

private string _ConnectionString;

private SqlConnection _Conn;
public DocumentClassLib()

{

_ConnectionString =
"Provider=SQLOLEDB.1;server=myhost;Trusted_Connect ion=yes;database=mydb;User
ID=alan;Password=alan";

_Conn = new SqlConnection(_ConnectionString);

}

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do
not
cease to be insipid." (c) Friedrich Nietzsche

Jun 28 '06 #3
Did you create the tlb (tlbexp YouComponent.dll ) which is used by VB to call
your methods?

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche


"Alan T" wrote:
I can now register the DLL by going to project options, set the Visible to
COM check box.

But the problem now is got a runtime error when creating an object in a
webpage using VBScript.
I tried to create a simple DLL also got the same runtime error.

"Michael Nemtsev" <ne*****@msn.com> wrote in message
news:3B**********************************@microsof t.com...
Does all dependent componens could be loaded and ComVisibleAttribute are
set
correctly?

Did y tried to googling first? there are a lot of answers
http://groups.google.com/groups/sear...ed&qt_s=Search

"Alan" wrote:
I created a DLL and tried to register with regasm.exe but got error:

RegAsm: warning RA0000 : No types were registered.
I check that I got the 'no args constructor', so it should be OK.
But it still gave me this warning.

This is the cutdown version of my class:

using System;

using System.Collections.Generic;

using System.Text;

using System.Data.SqlClient;

using System.Data;

namespace DocumentClassLibrary

{

public class DocumentClassLib

{

private string _ConnectionString;

private SqlConnection _Conn;
public DocumentClassLib()

{

_ConnectionString =
"Provider=SQLOLEDB.1;server=myhost;Trusted_Connect ion=yes;database=mydb;User
ID=alan;Password=alan";

_Conn = new SqlConnection(_ConnectionString);

}

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do
not
cease to be insipid." (c) Friedrich Nietzsche


Jun 29 '06 #4
Ah yes, again now I can create the com object in VBScript.
But again, another problem is I have methods in this DLL which returns
object like DataSet, I got an error like
incorrect call of procedure or argument.

This also happens in methods that require parameters whose type are object,
array..
eg.

public void CalSum(string[] aIntArr)
public DataSet GetEmployeeBatch(int aEmployeeID)

I don't know if it caused by VBScript that does not know about .NET 2.0
class?

"Michael Nemtsev" <ne*****@msn.com> wrote in message
news:CE**********************************@microsof t.com...
Did you create the tlb (tlbexp YouComponent.dll ) which is used by VB to
call
your methods?

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do
not
cease to be insipid." (c) Friedrich Nietzsche


"Alan T" wrote:
I can now register the DLL by going to project options, set the Visible
to
COM check box.

But the problem now is got a runtime error when creating an object in a
webpage using VBScript.
I tried to create a simple DLL also got the same runtime error.

"Michael Nemtsev" <ne*****@msn.com> wrote in message
news:3B**********************************@microsof t.com...
> Does all dependent componens could be loaded and ComVisibleAttribute
> are
> set
> correctly?
>
> Did y tried to googling first? there are a lot of answers
> http://groups.google.com/groups/sear...ed&qt_s=Search
>
> "Alan" wrote:
>
>> I created a DLL and tried to register with regasm.exe but got error:
>>
>> RegAsm: warning RA0000 : No types were registered.
>>
>>
>> I check that I got the 'no args constructor', so it should be OK.
>> But it still gave me this warning.
>>
>> This is the cutdown version of my class:
>>
>> using System;
>>
>> using System.Collections.Generic;
>>
>> using System.Text;
>>
>> using System.Data.SqlClient;
>>
>> using System.Data;
>>
>> namespace DocumentClassLibrary
>>
>> {
>>
>> public class DocumentClassLib
>>
>> {
>>
>> private string _ConnectionString;
>>
>> private SqlConnection _Conn;
>>
>>
>> public DocumentClassLib()
>>
>> {
>>
>> _ConnectionString =
>> "Provider=SQLOLEDB.1;server=myhost;Trusted_Connect ion=yes;database=mydb;User
>> ID=alan;Password=alan";
>>
>> _Conn = new SqlConnection(_ConnectionString);
>>
>> }
> --
> WBR,
> Michael Nemtsev :: blog: http://spaces.msn.com/laflour
>
> "At times one remains faithful to a cause only because its opponents do
> not
> cease to be insipid." (c) Friedrich Nietzsche
>


Jun 29 '06 #5

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

Similar topics

5
by: Giles Brown | last post by:
I'm feeling quite dumb this morning. I'm trying to build a COM server DLL using py2exe and it ain't working. Here's what ain't working... setup_dll.py based on py2exe sample: """from...
2
by: Robert M. | last post by:
Information: Server A: SQL Server 2000 Enterprise Edition. OS is Windows 2003 Server Enterprise Edition. SQL Service pack is 3a. Member of domain ABCDomain. Server A is going to function as a...
1
by: Earl Anderson | last post by:
My brother is in the process of purchasing a neighborhood dry cleaners store. Having seen some of the process applications I've written in MS Access, he asked me if I could develop an application...
29
by: orium69 | last post by:
hi everyone, i'm wondering if there is a way to have sure that a variable is allocated in the cache, after its declaration with "register"? Tks!
2
by: Andy Bates | last post by:
Hi - I have a C# .NET assembly that exposes a COM interface (basically has an interface and class with Guid attributes). If I compile this under VS.NET (with the "Register for COM Interop"...
5
by: Adam McKee | last post by:
We are using Visual Studio.NET 2003 in our project with .NET framework 1.1. One of our libraries is a mixed-mode dll assembly consisting of one managed C++ library, and several unmanaged C++...
5
by: richard.tallent | last post by:
I'm fond of web controls in ASP.NET, but the need for <@ Register%> blocks at the top of each page is a pain. ASP.NET 2.0 has a way to centrally register controls in the web.config file, but it...
33
by: Snis Pilbor | last post by:
With the "as if" rule in play, doesn't that effectively render the "register" keyword completely useless? Example: I make a silly compiler which creates code that goes out of its way to take a...
5
by: prouleau001 | last post by:
Hi all! Since that the decorator syntax is upon us, I think it would be good if atexit.register() was returning the function passed as argument. This simple change to the library would solve a...
21
by: JOYCE | last post by:
Look the subject,that's my problem! I hope someone can help me, thanks
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
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: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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
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

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.