Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Loading Assemblies, when the interface is not defined by your application

Reply
Thread Tools

Loading Assemblies, when the interface is not defined by your application

 
 
Timothy
Guest
Posts: n/a
 
      01-24-2004
Hi,

As an addition to my previous question

The following code is not allowed because the IDbConnection interface is
not defined by my application (right ?)

So how can I make this work ?

ObjectHandle hNdl =
Activator.CreateInstanceFrom(@"data\MyData.Data.dl l","MyData.Data.MyDataClient.MyDataConnection") ;
IDbConnection dbConnection = (IDbConnection)hNdl.Unwrap();

Thnx.

TP
 
Reply With Quote
 
 
 
 
Gaurav Khanna [C# MVP]
Guest
Posts: n/a
 
      01-27-2004
Hi!

Put a reference to System.Data.dll assembly and use the System.Data
namespace. That should do the trick.

--
Regards,
Kumar Gaurav Khanna
-----------------------------------------------------------------
Microsoft MVP - C#/.NET, MCSE Windows 2000/NT4, MCP+I
WinToolZone - Spelunking Microsoft Technologies
http://www.wintoolzone.com/
OpSupport - Spelunking Rotor
http://opsupport.sscli.net/
Bangalore .NET Users' Group
http://groups.msn.com/bdotnet/
"Timothy" <(E-Mail Removed)> wrote in message
news:40123e6b$0$324$(E-Mail Removed)...
> Hi,
>
> As an addition to my previous question
>
> The following code is not allowed because the IDbConnection interface is
> not defined by my application (right ?)
>
> So how can I make this work ?
>
> ObjectHandle hNdl =
>

Activator.CreateInstanceFrom(@"data\MyData.Data.dl l","MyData.Data.MyDataClie
nt.MyDataConnection");
> IDbConnection dbConnection = (IDbConnection)hNdl.Unwrap();
>
> Thnx.
>
> TP



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Re: __STDC_IEC_559__ (defined or !defined ?) Keith Thompson C Programming 0 08-17-2010 04:36 PM
User-defined exception: "global name 'TestRunError' is not defined" jmike@alum.mit.edu Python 1 07-10-2008 12:37 PM
[OT] Is loading the second Java application faster than loading the first? David Segall Java 2 01-02-2007 04:41 PM
Using parenthesis with defined (#if defined(...)) Angel Tsankov C++ 1 04-05-2006 10:00 PM
#if (defined(__STDC__) && !defined(NO_PROTOTYPE)) || defined(__cplusplus) Oodini C Programming 1 09-27-2005 07:58 PM



Advertisments