Wrox Programmer Forums
|
BOOK: Professional ASP.NET 1.0, Special Edition/1.1
This is the forum to discuss the Wrox book Professional ASP.NET 1.1 by Alex Homer, Dave Sussman, Rob Howard, Brian Francis, Karli Watson, Richard Anderson; ISBN: 9780764558900
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 1.0, Special Edition/1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 7th, 2003, 02:24 PM
Authorized User
 
Join Date: Jun 2003
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to erobb Send a message via Yahoo to erobb
Default Using Classic Com with .Net

I am trying to use a Classic Com in .Net. The com object needed a wrapper so I used tlbimp with no switches

tlbimp myTest.tlb which ran ok, took the resulting myTestLib.dll & copyed into the bin directory of my website.

Name space imports fine

<%@ Import Namespace="myTestLib" %>

<script runat="server">
'Where CurrVer should return a string of what the_
current com version is

    Dim p as string
    p=(myTestLib.CurrVer)
</script>

Fails on myTestLib.CurrVer BC30188: Declaration expected.

I've only been working with .Net a week so Im not sure if I have done something improper on the conversion of the com or its just my syntax ignorance.

Thanks
Earl
 
Old September 8th, 2003, 08:10 PM
Authorized User
 
Join Date: Jun 2003
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to erobb Send a message via Yahoo to erobb
Default

Doh figured it out... should call the class instead of namespace so

So This works

<%@ Import Namespace="myTestLib" %>

<script runat="server">
Dim ConnObj As aClassFromMyTestLib
Sub Page_Load()
ConnObj = new aClassFromMyTestLib
ConnObj.Open((Application("Server")),(Application( "System")))
Response.write (ConnObj.Error)
ConnObj.Close
End Sub
</script>






Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing a .NET DLL from Classic ASP crmpicco ASP.NET 1.0 and 1.1 Basics 11 September 9th, 2007 09:51 PM
asp.net vs classic asp "URGENT" naeem_ul_hussan Classic ASP Professional 1 August 1st, 2007 03:14 PM
classic asp with asp.net on same iis bostonrose .NET Framework 2.0 6 January 10th, 2007 12:38 PM
CLassic ASP in Visual Studio.NET rodmcleay ASP.NET 1.0 and 1.1 Professional 2 September 6th, 2004 08:06 PM
Best Practise for VS.NET IDE and Classic ASP rodmcleay Classic ASP Professional 1 September 3rd, 2004 03:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.