Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / May 2008

Tip: Looking for answers? Try searching our database.

error constructor with no parameters does not exist

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul - 29 May 2008 19:33 GMT
Hi I am using a dataobject and trying to add two select parameters as follows:
ObjectDataSource1.SelectParameters.Clear();
           ObjectDataSource1.SelectParameters.Add("DepartmentID", ("1");
           ObjectDataSource1.SelectParameters.Add("Active", "1");
I get the error message that makes it appear that the parameters are not
being added, thanks.
Signature

Paul G
Software engineer.

Mark Fitzpatrick - 29 May 2008 19:42 GMT
Did you retype the following code, or was it copied and pasted.
ObjectDataSource1.SelectParameters.Add("DepartmentID", ("1");

I ask because if you notice, you are passing the second parameter as ("1"),
which is incorrect. In this case just remove the extra ( right before the
"1";

The next issue though, would be the "1". Are you trying to pass a default
value? If so then you'll need to look closer at the parameter constructor
definition. It expects the second parameter passed into the constructor to
be a TypeCode as in
ObjectDataSource1.SelectParameters.Add("DepartmentID",TypeCode.Int32);
that could also get you an error if you are trying to pass a default value
isntead.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression

> Hi I am using a dataobject and trying to add two select parameters as
> follows:
[quoted text clipped - 3 lines]
> I get the error message that makes it appear that the parameters are not
> being added, thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.