|
-
Mar 17th, 2003, 05:27 PM
#1
Thread Starter
Registered User
No overload for method error
I am a new C# developer (making the switch from VB but have a strong understanding of .NET and a basic understanding of C++). I am using the ADO command.execute method and I keep getting the following error:
No overload for method 'Execute' takes '0' arguments
I know the error means I haven't passed in all the arguments for the execute method. However in both C++ and VB, the arguments for the Execute method are optional and you can execute the method by simply saying:
cmd.Execute(); //cmd is ADODB.Command
For the life of me, I cannot figure out how to get it to just take the default values for the execute method (I know this is a limitation in C#). Any ideas?
-
Mar 19th, 2003, 06:50 PM
#2
yay gay
C# doesnt allow optional arguments.
\m/  \m/
-
Mar 21st, 2003, 06:10 AM
#3
Member
Yeah, I learned that the hard way too, after switching from VB to C#.
But got used to it now.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|