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

Seesion Manager

Being new at web in general and starting in over my head
(http://www.vbdotnetheaven.com/Upload...GardenVb.aspx),
I'm hoping to get some general direction on implementing an interface. In
the article above, there are public listings of two interfaces Session and
SessionManager.

Specifically I am receiving this error:

Error 1 Cannot refer to an instance member of a class from within a shared
method or shared member initializer without an explicit instance of the
class. C:\VB8\SQLPoorMon\SQLPoorMon\SQLPoorMon\Default.as px.vb 41 12 SQLPoorMon

AND

a bunch of these:
Error 10 Class 'SessionManager' must implement 'Function createSessionId()
As String' for interface
'ISessionManager'. C:\VB8\SQLPoorMon\SQLPoorMon\SQLPoorMon\SessionMan ager.vb 18 16 SQLPoorMon
I am unsure of a method of dealing with an interface. For example, does the
declaration of the interface belong in the default.aspx or should it reside
in with the SessionManager class? How is the interface implemented? Is
there a call required from default.aspx similar to what might occur using a
WithEvents call? Does the interface need to be pre-registered in the GAC
before it can be implemented?

Help appreciated.
--
Regards,
Jamie

Mar 7 '07 #1
1 1025
An interface "Looks like" a class, but it is only a contract and has no
implementation.
When you have a class that implements (derives from) an Interface, it must
implement all the
methods defined by the interface. The interface could be in a different
assembly, or even in the same assembly.
GAC is not involve here.

The error you referred to is that you have a static (shared in vb.net)
method where you are attempting
to refer to a non-static (instance) member of the class, and there isn't any
instance object to do it with.

Look up "Static" and "Shared" in the documentation.

Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"thejamie" wrote:
Being new at web in general and starting in over my head
(http://www.vbdotnetheaven.com/Upload...GardenVb.aspx),
I'm hoping to get some general direction on implementing an interface. In
the article above, there are public listings of two interfaces Session and
SessionManager.

Specifically I am receiving this error:

Error 1 Cannot refer to an instance member of a class from within a shared
method or shared member initializer without an explicit instance of the
class. C:\VB8\SQLPoorMon\SQLPoorMon\SQLPoorMon\Default.as px.vb 41 12 SQLPoorMon

AND

a bunch of these:
Error 10 Class 'SessionManager' must implement 'Function createSessionId()
As String' for interface
'ISessionManager'. C:\VB8\SQLPoorMon\SQLPoorMon\SQLPoorMon\SessionMan ager.vb 18 16 SQLPoorMon
I am unsure of a method of dealing with an interface. For example, does the
declaration of the interface belong in the default.aspx or should it reside
in with the SessionManager class? How is the interface implemented? Is
there a call required from default.aspx similar to what might occur using a
WithEvents call? Does the interface need to be pre-registered in the GAC
before it can be implemented?

Help appreciated.
--
Regards,
Jamie
Mar 7 '07 #2

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

Similar topics

0
by: semarketing-request | last post by:
>>>> This is a multi-part message in MIME format. **** Command 'this' not recognized. **** No valid commands found. **** Commands must be in message BODY, not in HEADER. **** Help for...
1
by: Carl Bevil | last post by:
Hello all. If I want to use a custom memory manager to, say, track memory allocations in Python, what's the best way to do this? I seem to remember there being a way in version 1.5 (or so -- been...
3
by: Navin | last post by:
hi, guys i have query which given below output given below manager personlevel person name 2085 1 Howard Wilson1 2085 2 Howard Wilson2 2085 3 Howard Wilson3 2085 4 Howard Wilson4...
4
by: John Morgan | last post by:
I have Enterprise Manager on my local machine. For the last twelve months it has been connecting without problem to my online SQL Server database provided by my ISP. Three weeks ago the ISP...
3
by: Fresh Air Rider | last post by:
Hi SQL Gurus Could anyone please explain how the following stored procedure can be amended to retrieve Subordinates in alphabetical order ? The example below simply retrives records in the...
1
by: mikew | last post by:
I am working at a company that has been using MS SQL Server, and we are going to be switching over to postgresql next week. (Getting off of Windows will be a relief!) I am very familiar with SQL...
0
by: Zorba.GR | last post by:
IBM DB2 Connect Enterprise Edition v8.2, other IBM DB2 (32 bit, 64 bit) (MULTiOS, Windows, Linux, Solaris), IBM iSoft Commerce Suite Server Enterprise v3.2.01, IBM Tivoli Storage Resource Manager...
0
by: Yoni Gibbs | last post by:
Hi, I need to build a "login manager" using C#, for a desktop application. I am new to .NET, having previously only worked in COM, so please forgive my ignorance. What I need is a "login...
2
by: AH | last post by:
Dear all, I am facing this 'bug' that really drive me nut. I created a trigger for Update script and tested in Enterprise manager to ensure it function correctly. However, when I used both VB or...
1
by: Miro | last post by:
I am going throug a vb 2005 book, but I am using vs 2008 professional, and I cant seem to find a menu option its talking about. I am wondering if this has moved - i cannot seem to find it for the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.