Advertisement

05.01.2008 at 01:02AM PDT, ID: 23367871
[x]
Attachment Details

Linq to SQL query question

Asked by alan_ITG in Language Integrated Query - LINQ, Microsoft Visual Basic.Net

I have a project which uses standard SQL commands/connections and am introducing some functions which use Linq to query the database.

The simple query below
        Dim Db As New CEDataContext
        Dim SysDet = From p In db.SystemDetails _
                     Where p.SysName = s _
                     Select p

        If IsDBNull(p.syscode) Then

        End If

produces an error stating that the variable p is not declared.  I did not think that these had to be declared as they were anonymous types.

Is this error a function of the mixed environment?
How do I resolve the error?

Thanks


AlanStart Free Trial
[+][-]05.01.2008 at 04:41AM PDT, ID: 21477767

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.01.2008 at 04:44AM PDT, ID: 21477776

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.01.2008 at 04:46AM PDT, ID: 21477782

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Language Integrated Query - LINQ, Microsoft Visual Basic.Net
Sign Up Now!
Solution Provided By: emoreau
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628