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" <(E-Mail Removed)> wrote in message
news:CE1C5E37-42C8-415C-87B8-(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:3B6CADC5-FEAE-4378-84C6-(E-Mail Removed)...
>> > 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_Connection=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
>> >
>>
>>
>>