Compilation error in Visual Web Devloper, SiteCode is not declared

Hi,
I am opening a website in Microsoft Visual web developer 2010 express, which worked before but now I'm getting an error

Compilation Error
  Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

 Compiler Error Message: BC30451: 'SiteCode' is not declared. It may be inaccessible due to its protection level.

Source Error:

it highlights the following code
Line 8:          aDb = SiteCode.openDBConnection(aDb)

Open in new window

which is in a file named openDB.vb

I tested the connection and it seems to be working fine....any guidance appreciated. Thanks
blossomparkAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Fernando SotoRetiredCommented:
In order to help with this we need to see the class this line of code is defined in, please post.
0
Paul JacksonSoftware EngineerCommented:
Yes basically saying that Sitecode is not declared, show us the code where this is declared in openDB.vb if it is, and also the start of the Sitecode class if you have it.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
blossomparkAuthor Commented:
Hi Fernando, this what you require?
Public Class openDB
    Public Shared Sub AddTarget(ByVal TargetName As String, ByVal nt_name As String)
        Dim aDb As New ADODB.Connection
        aDb = SiteCode.openDBConnection(aDb)
        aDb.Execute("EXECUTE [TEST_DB].[dbo].[AddTarget] '" & TargetName & "','" & nt_name & "'")
        aDb.Close()
    End Sub

Open in new window

0
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

blossomparkAuthor Commented:
ok...you need where it says SiteCode=
0
Fernando SotoRetiredCommented:
Show or upload the file that code is in. We need to see where you declare SiteCode where you use it in the code.
0
blossomparkAuthor Commented:
searched complete solution for  " sitecode= " and a few variations of this.
Not there.
Therein lies the issue I guess
0
Fernando SotoRetiredCommented:
Well if that is the case then you are missing an instantiation of the variable. You will need to figure out where to do that.
0
Fernando SotoRetiredCommented:
See where this is defined in your solution, openDBConnection.
0
Paul JacksonSoftware EngineerCommented:
It sounds like you are missing the class Sitecode from the project, try searching for just sitecode across the whole project or try looking at where you store your source code to see if there is a file you are missing. It may be that it is a completely separate project that is compiled and then referenced by your other project too.
0
blossomparkAuthor Commented:
Paul and Fernando,
Firstly apologies for not responding sooner.
Secondly, thank you for your inputs, it has been most helpful.
Finally I am closing this question for the time being, I need to be  in a position to devote more time to it  to supply ye with the information ye need and unfortunately not in a position to do that currently,
Thanks again and have a great weekend
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.