vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I am trying to set up a "cmd.CommandType = adCmdStoredProc" but I receive the error "Type 'adCmdStoredProc' 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 |
| |||
| stingrays@mindspring.com (stingrays) wrote in message news:<609f4c08.0404050932.50bd3145@posting.google. com>... > I am trying to set up a "cmd.CommandType = adCmdStoredProc" but I > receive the error "Type 'adCmdStoredProc' 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 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 |
| |||
| Seems to me, you're using a legacy ADO constant with a .NET component. Try: 'cmd.CommandType = CommandType.StoredProcedure'. Rgds - Jesper "stingrays" <stingrays@mindspring.com> skrev i en meddelelse news:609f4c08.0404050932.50bd3145@posting.google.c om... > I am trying to set up a "cmd.CommandType = adCmdStoredProc" but I > receive the error "Type 'adCmdStoredProc' 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 |
| |||
| Thanks. I changed it to cmd.CommandType = CommandType.StoredProcedure and my parameters to cmd.Parameters.Add("@EntryDate") and now I have the statement: 'Add' is not a member of ADODB.Parameters. 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@post.tdcadsl.dk> wrote in message news:<40727ba0$0$229$edfadb0f@dread12.news.tele.dk >... > Seems to me, you're using a legacy ADO constant with a .NET component. > > Try: 'cmd.CommandType = CommandType.StoredProcedure'. > > Rgds - Jesper > > "stingrays" <stingrays@mindspring.com> skrev i en meddelelse > news:609f4c08.0404050932.50bd3145@posting.google.c om... > > I am trying to set up a "cmd.CommandType = adCmdStoredProc" but I > > receive the error "Type 'adCmdStoredProc' 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 |
| ||||
| 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@mindspring.com (stingrays) wrote in message news:<609f4c08.0404070436.44d5c45@posting.google.c om>... > Thanks. I changed it to cmd.CommandType = CommandType.StoredProcedure > and my parameters to cmd.Parameters.Add("@EntryDate") and now I have > the statement: 'Add' is not a member of ADODB.Parameters. > > 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@post.tdcadsl.dk> wrote in message news:<40727ba0$0$229$edfadb0f@dread12.news.tele.dk >... > > Seems to me, you're using a legacy ADO constant with a .NET component. > > > > Try: 'cmd.CommandType = CommandType.StoredProcedure'. > > > > Rgds - Jesper > > > > "stingrays" <stingrays@mindspring.com> skrev i en meddelelse > > news:609f4c08.0404050932.50bd3145@posting.google.c om... > > > I am trying to set up a "cmd.CommandType = adCmdStoredProc" but I > > > receive the error "Type 'adCmdStoredProc' 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 |
| Thread Tools | |
| Display Modes | |
|
|