Cannot find the type 'IEnumerator'

  • Hi,

    I am getting following error when trying to deploy the crl code.

    Cannot find the type 'IEnumerator', because it does not exist or you do not have permission.

    any help?

  • i think you are missing a reference; try adding

    Imports System.Collections

    to the top of your class. IEnumeration is a member of System.Collections.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • I have the required reference and project is building successfully, but i am getting this error while deploying it to the database.

    FYI i have restore the databse from one server to another, BUT owners are same.

  • usman.tanveer (6/10/2009)


    Hi,

    I am getting following error when trying to deploy the crl code.

    Cannot find the type 'IEnumerator', because it does not exist or you do not have permission.

    any help?

    How are you trying to deploy it? And what are you trying to deploy it too?

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Using the deploy option in visual studio, selected the required sql server 2005 database connection and 'Unsafe' permission level.

    I have the sysmtem.dll in the reference also I have included the "using System.Collections;" in the code file.

  • usman.tanveer (6/10/2009)


    Using the deploy option in visual studio, selected the required sql server 2005 database connection and 'Unsafe' permission level.

    I have the sysmtem.dll in the reference also I have included the "using System.Collections;" in the code file.

    What is the OS of the SQL Server's machine and what versions of the .NET Framework does it have installed?

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Windows server 2003 Enterprise sp2, and .net 2.0

    btw my colleague is able to deploy the same code, we both have the sysadmin rights on sql server, but i am getting this error.

  • Hmm, got me. I am going to see if someone else can help out here...

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • usman.tanveer (6/11/2009)


    Windows server 2003 Enterprise sp2, and .net 2.0

    btw my colleague is able to deploy the same code, we both have the sysadmin rights on sql server, but i am getting this error.

    Hey there,

    I have so many questions...:-)

    So, have you ever been able to deploy CLR code from your machine to this SQL Server, or any SQL Server for that matter?

    Have you tried running a Profiler trace on the server while deploying to see which statement issued by VS is causing the error?

    Are you able to deploy the code when logged in as you on another machine (your colleague's machine would be a good test)?

    Are you able to deploy a really simple test function that just, say, doubles a number?

    If it is possible to post short example code (C# for preference!) that would help too.

    This is not an error I have encountered personally, but it should be possible to debug it like any other weird issue: test different things to reduce the number of potential causes.

    Look forward to your reply.

    Cheers,

    Paul

    P.S. Barry: thanks for the nudge 😉

  • Thanks guys, will do these tests and provide you feedback.

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply