Click here to Skip to main content
15,893,923 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to do this in C#? Pin
momer1-Nov-04 4:38
momer1-Nov-04 4:38 
GeneralRe: How to do this in C#? Pin
Judah Gabriel Himango1-Nov-04 5:15
sponsorJudah Gabriel Himango1-Nov-04 5:15 
GeneralRe: How to do this in C#? Pin
momer1-Nov-04 5:21
momer1-Nov-04 5:21 
GeneralProcess sql scripts Pin
totig1-Nov-04 2:21
totig1-Nov-04 2:21 
GeneralRe: Process sql scripts Pin
Alex Korchemniy1-Nov-04 7:14
Alex Korchemniy1-Nov-04 7:14 
GeneralInstall MSI from code Pin
petst1-Nov-04 1:57
petst1-Nov-04 1:57 
GeneralRe: Install MSI from code Pin
Heath Stewart1-Nov-04 8:20
protectorHeath Stewart1-Nov-04 8:20 
GeneralExtending ADODDB Classes in C# Pin
mohit_kinalekar1-Nov-04 1:43
mohit_kinalekar1-Nov-04 1:43 
Hi,

I am trying to extend ADODB Classes in C# & then override their methods.

I added reference to ADO 2.7 and then extended the classes (connection, recordset, ....). After that i started overriding the methods of ADODB base class.


Then i tried to make a type library (.tlb) of the same using regasm utility, so that I can access the extended classess from existing asps.

Over here it's giving me error as follows:

RegAsm error: Types extending from COM objects should override all methods of an interface implemented by the base COM
class.

I did override all 8 methods Connection class (BeginTrans, Cancel,Close, CommitTrans, Execute, Open, OpenSchema, RollbackTrans ).

Do we need to override the events as well? Could anyone please explain what exactly i am doing wrong?

Thanks & Regards,

Mohit

Sample code:

using System;
using ADODB;
using System.Data.SqlClient;

namespace ADOLibrary
{
///
/// Summary description for Class1.
///

///

public class Connection : ConnectionClass
{
override public System.Int32 BeginTrans()
{
return base.BeginTrans();
}

override public void Cancel()
{
base.Cancel();
}

override public void Close()
{
base.Close();
}
override public void CommitTrans()
{
base.CommitTrans();
}

override public ADODB.Recordset Execute(System.String CommandText ,out System.Object RecordsAffected , System.Int32 Options)
{
return base.Execute(CommandText,out RecordsAffected,Options);
}

override public void Open(System.String ConnectionString ,System.String UserID ,System.String Password ,System.Int32 Options)
{
base.Open(ConnectionString,UserID,Password,Options);
}

override public ADODB.Recordset OpenSchema(ADODB.SchemaEnum Schema ,System.Object Restrictions ,System.Object SchemaID)
{
return base.OpenSchema(Schema, Restrictions, SchemaID);
}
override public void RollbackTrans()
{
base.RollbackTrans();
}
}
Generaldownloading pdf files from web page links Pin
JeromeKJerome1-Nov-04 1:14
JeromeKJerome1-Nov-04 1:14 
GeneralRe: downloading pdf files from web page links Pin
perlmunger1-Nov-04 5:39
perlmunger1-Nov-04 5:39 
GeneralRe: downloading pdf files from web page links Pin
JeromeKJerome1-Nov-04 8:01
JeromeKJerome1-Nov-04 8:01 
GeneralRe: downloading pdf files from web page links Pin
Heath Stewart1-Nov-04 8:17
protectorHeath Stewart1-Nov-04 8:17 
Generalmarshall unsigned char *** Pin
naxos1-Nov-04 0:59
naxos1-Nov-04 0:59 
GeneralWhere is Managed DirectX installed on Win98 Pin
Wizard_011-Nov-04 0:21
Wizard_011-Nov-04 0:21 
GeneralRe: Where is Managed DirectX installed on Win98 Pin
Heath Stewart1-Nov-04 8:35
protectorHeath Stewart1-Nov-04 8:35 
GeneralSystem.Aritmetic exeption Pin
Lutfullah31-Oct-04 23:42
Lutfullah31-Oct-04 23:42 
GeneralRe: System.Aritmetic exeption Pin
Salil Khedkar1-Nov-04 19:13
Salil Khedkar1-Nov-04 19:13 
GeneralRunning application in a machine not having .NET installed in it Pin
eDip31-Oct-04 21:40
eDip31-Oct-04 21:40 
GeneralRe: Running application in a machine not having .NET installed in it Pin
Malendra1-Nov-04 0:11
Malendra1-Nov-04 0:11 
GeneralRe: Running application in a machine not having .NET installed in it Pin
Salil Khedkar1-Nov-04 19:18
Salil Khedkar1-Nov-04 19:18 
GeneralRe: Running application in a machine not having .NET installed in it Pin
Salil Khedkar1-Nov-04 19:26
Salil Khedkar1-Nov-04 19:26 
GeneralAdd Flash movie to the mdi form Pin
amalatsliit31-Oct-04 21:24
amalatsliit31-Oct-04 21:24 
GeneralRe: Add Flash movie to the mdi form Pin
Corinna John1-Nov-04 0:13
Corinna John1-Nov-04 0:13 
GeneralGetChanges problem with deleting child row Pin
maqster31-Oct-04 21:11
maqster31-Oct-04 21:11 
GeneralWindows Forms disable user input Pin
Lyhr31-Oct-04 20:48
Lyhr31-Oct-04 20:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.