Type 'adCmdStoredProc' is not declared

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • stingrays

    Type 'adCmdStoredProc' is not declared

    I am trying to set up a "cmd.CommandTyp e = adCmdStoredProc " but I
    receive the error "Type 'adCmdStoredPro c' is not declared". What do I
    need to do to declare it? I am using MSDE with SQLDataAdapter. I am
    trying to exceute a stored procedure from within my VB .NET 2003 code.

    Thanks.

    JH
  • Simon Hayes

    #2
    Re: Type 'adCmdStoredPro c' is not declared

    stingrays@minds pring.com (stingrays) wrote in message news:<609f4c08. 0404050932.50bd 3145@posting.go ogle.com>...[color=blue]
    > I am trying to set up a "cmd.CommandTyp e = adCmdStoredProc " but I
    > receive the error "Type 'adCmdStoredPro c' is not declared". What do I
    > need to do to declare it? I am using MSDE with SQLDataAdapter. I am
    > trying to exceute a stored procedure from within my VB .NET 2003 code.
    >
    > Thanks.
    >
    > JH[/color]

    I think you'll probably get a better answer in a .NET newsgroup - it
    looks like the ADO constants are not being recognized, but I know very
    little about .NET and ADO, so I may be completely wrong.

    Simon

    Comment

    • Jesper Jensen

      #3
      Re: Type 'adCmdStoredPro c' is not declared

      Seems to me, you're using a legacy ADO constant with a .NET component.

      Try: 'cmd.CommandTyp e = CommandType.Sto redProcedure'.

      Rgds - Jesper

      "stingrays" <stingrays@mind spring.com> skrev i en meddelelse
      news:609f4c08.0 404050932.50bd3 145@posting.goo gle.com...[color=blue]
      > I am trying to set up a "cmd.CommandTyp e = adCmdStoredProc " but I
      > receive the error "Type 'adCmdStoredPro c' is not declared". What do I
      > need to do to declare it? I am using MSDE with SQLDataAdapter. I am
      > trying to exceute a stored procedure from within my VB .NET 2003 code.
      >
      > Thanks.
      >
      > JH[/color]


      Comment

      • stingrays

        #4
        Re: Type 'adCmdStoredPro c' is not declared

        Thanks. I changed it to cmd.CommandType = CommandType.Sto redProcedure
        and my parameters to cmd.Parameters. Add("@EntryDate ") and now I have
        the statement: 'Add' is not a member of ADODB.Parameter s.

        It isn't listed there in the drop down as I am typing so I expected
        this. Am I missing a reference in my project? I am using the
        'ActiveX Data Objects 2.7 Library.

        Thanks for the help.

        Jason

        "Jesper Jensen" <moellemand@pos t.tdcadsl.dk> wrote in message news:<40727ba0$ 0$229$edfadb0f@ dread12.news.te le.dk>...[color=blue]
        > Seems to me, you're using a legacy ADO constant with a .NET component.
        >
        > Try: 'cmd.CommandTyp e = CommandType.Sto redProcedure'.
        >
        > Rgds - Jesper
        >
        > "stingrays" <stingrays@mind spring.com> skrev i en meddelelse
        > news:609f4c08.0 404050932.50bd3 145@posting.goo gle.com...[color=green]
        > > I am trying to set up a "cmd.CommandTyp e = adCmdStoredProc " but I
        > > receive the error "Type 'adCmdStoredPro c' is not declared". What do I
        > > need to do to declare it? I am using MSDE with SQLDataAdapter. I am
        > > trying to exceute a stored procedure from within my VB .NET 2003 code.
        > >
        > > Thanks.
        > >
        > > JH[/color][/color]

        Comment

        • Samuel Hon

          #5
          Re: Type 'adCmdStoredPro c' is not declared

          It appears to me that you are getting confused by ADO

          In .NET, you use ADO.NET via the System.Data namespace and you
          shouldnt actually need to reference 'ActiveX Data Objects 2.7 Library'

          Sam



          stingrays@minds pring.com (stingrays) wrote in message news:<609f4c08. 0404070436.44d5 c45@posting.goo gle.com>...[color=blue]
          > Thanks. I changed it to cmd.CommandType = CommandType.Sto redProcedure
          > and my parameters to cmd.Parameters. Add("@EntryDate ") and now I have
          > the statement: 'Add' is not a member of ADODB.Parameter s.
          >
          > It isn't listed there in the drop down as I am typing so I expected
          > this. Am I missing a reference in my project? I am using the
          > 'ActiveX Data Objects 2.7 Library.
          >
          > Thanks for the help.
          >
          > Jason
          >
          > "Jesper Jensen" <moellemand@pos t.tdcadsl.dk> wrote in message news:<40727ba0$ 0$229$edfadb0f@ dread12.news.te le.dk>...[color=green]
          > > Seems to me, you're using a legacy ADO constant with a .NET component.
          > >
          > > Try: 'cmd.CommandTyp e = CommandType.Sto redProcedure'.
          > >
          > > Rgds - Jesper
          > >
          > > "stingrays" <stingrays@mind spring.com> skrev i en meddelelse
          > > news:609f4c08.0 404050932.50bd3 145@posting.goo gle.com...[color=darkred]
          > > > I am trying to set up a "cmd.CommandTyp e = adCmdStoredProc " but I
          > > > receive the error "Type 'adCmdStoredPro c' is not declared". What do I
          > > > need to do to declare it? I am using MSDE with SQLDataAdapter. I am
          > > > trying to exceute a stored procedure from within my VB .NET 2003 code.
          > > >
          > > > Thanks.
          > > >
          > > > JH[/color][/color][/color]

          Comment

          • Samuel Hon

            #6
            Re: Type 'adCmdStoredPro c' is not declared

            It appears to me that you are getting confused by ADO

            In .NET, you use ADO.NET via the System.Data namespace and you
            shouldnt actually need to reference 'ActiveX Data Objects 2.7 Library'

            Sam



            stingrays@minds pring.com (stingrays) wrote in message news:<609f4c08. 0404070436.44d5 c45@posting.goo gle.com>...[color=blue]
            > Thanks. I changed it to cmd.CommandType = CommandType.Sto redProcedure
            > and my parameters to cmd.Parameters. Add("@EntryDate ") and now I have
            > the statement: 'Add' is not a member of ADODB.Parameter s.
            >
            > It isn't listed there in the drop down as I am typing so I expected
            > this. Am I missing a reference in my project? I am using the
            > 'ActiveX Data Objects 2.7 Library.
            >
            > Thanks for the help.
            >
            > Jason
            >
            > "Jesper Jensen" <moellemand@pos t.tdcadsl.dk> wrote in message news:<40727ba0$ 0$229$edfadb0f@ dread12.news.te le.dk>...[color=green]
            > > Seems to me, you're using a legacy ADO constant with a .NET component.
            > >
            > > Try: 'cmd.CommandTyp e = CommandType.Sto redProcedure'.
            > >
            > > Rgds - Jesper
            > >
            > > "stingrays" <stingrays@mind spring.com> skrev i en meddelelse
            > > news:609f4c08.0 404050932.50bd3 145@posting.goo gle.com...[color=darkred]
            > > > I am trying to set up a "cmd.CommandTyp e = adCmdStoredProc " but I
            > > > receive the error "Type 'adCmdStoredPro c' is not declared". What do I
            > > > need to do to declare it? I am using MSDE with SQLDataAdapter. I am
            > > > trying to exceute a stored procedure from within my VB .NET 2003 code.
            > > >
            > > > Thanks.
            > > >
            > > > JH[/color][/color][/color]

            Comment

            Working...