473,378 Members | 1,140 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Type 'adCmdStoredProc' is not declared

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
Jul 20 '05 #1
5 11798
st*******@mindspring.com (stingrays) wrote in message news:<60**************************@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
Jul 20 '05 #2
Seems to me, you're using a legacy ADO constant with a .NET component.

Try: 'cmd.CommandType = CommandType.StoredProcedure'.

Rgds - Jesper

"stingrays" <st*******@mindspring.com> skrev i en meddelelse
news:60**************************@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

Jul 20 '05 #3
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" <mo********@post.tdcadsl.dk> wrote in message news:<40*********************@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" <st*******@mindspring.com> skrev i en meddelelse
news:60**************************@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

Jul 20 '05 #4
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

st*******@mindspring.com (stingrays) wrote in message news:<60*************************@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" <mo********@post.tdcadsl.dk> wrote in message news:<40*********************@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" <st*******@mindspring.com> skrev i en meddelelse
news:60**************************@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

Jul 20 '05 #5
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

st*******@mindspring.com (stingrays) wrote in message news:<60*************************@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" <mo********@post.tdcadsl.dk> wrote in message news:<40*********************@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" <st*******@mindspring.com> skrev i en meddelelse
news:60**************************@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

Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Olle Lundin | last post by:
Hi I´m trying to encapsulate a type in a class but I´m getting this error message (Compiler error), could you please explain what I´m doing wrong. /Olle Compile error: Only public user...
2
by: JohnnySparkles | last post by:
Hi everyone, I'm currently writing an application which uses the XmlSerializer class to serialize/deserialize objects to/from xml. Now when deserializing an XmlDocument back into the object,...
13
by: Timothy Madden | last post by:
Hello all I'm facing a very strange problem. I need to define a function that takes as argument something like a pointer to itself. It takes as argument a pointer of the same type as a pointer...
13
by: Dan Tsafrir | last post by:
is the following code standard? (cleanly compiles under g++-4.0.2): struct Asc { bool operator()(int a, int b) {return a < b;} }; struct Des { bool operator()(int a, int b) {return b > a;} };...
3
by: karthick.ramachandran | last post by:
Hi, I was just reading this article http://www.netobjectives.com/resources/downloads/Best_Practices_CSharp_Delegates.pdf In which the author had mentioned <quote> Delegates would appear...
5
by: AMDRIT | last post by:
I would like to cast an object to a value type specified by a variable of Type Function ReturnTest(InputVar as Object) as Object Dim DataType as Type = GetType(System.String) If TypeOf...
4
by: anthony.wolfe | last post by:
Hello all, I'm hoping that someone could help me with this bit of code. I am using reflection to dynamically call a method within an HttpHandler. When a method returns a user defined type that...
1
by: Mirek Endys | last post by:
Hello, I need to get the type of item in the declared generic List. This is my class and my List derrived from List<MyItemClass> public class MyList : List<MyItemClass> { }
10
by: marc | last post by:
Hoi there, I am a Delphi Programer who moved over to C# some months ago. So far I am really happy with C# and feelt myself confortable quite fast. Just some advanced questions regarding the type...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.