Advertisement

05.20.2008 at 05:47PM PDT, ID: 23419347
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.3

Procedure or function 'WriteRef' expects a parameter @authentdate which was not supplied

Asked by kwh3856 in Microsoft Visual C#.Net

Tags: , , ,

Basically, I am trying to check a field to determine if it is blank.  If it is, then I give it a null value if not then I capture the .value parameter for the field and add it to my paramaters variable.

I have determined that if I assign the variable a value the error messages does not occur.  It is only when I assign the variable a null value I then get the error message.  In the datastructure of the table, I allow nulls but it seems it does not even pass the parameters.add variable if the data in the variable is null.  Does anyone have any ideas on how to fix this?

Here my code:

Note: I commented the actual line to run a test to see if it would fail with data in the variable..


// Check if AUTHSTARTDATE is Null Value
        string datecheck;
        datecheck = WebDateTimeStartDate.Value.ToString();
        Nullable<DateTime> dt = null;
        if (datecheck != "1/1/0001 12:00:00 AM")------- for some reason the variable defaults to this if left blank
        {
            cmd.Parameters.Add("@AUTHSTARTDATE", SqlDbType.DateTime).Value = WebDateTimeStartDate.Value;
        }
        else
        {
            // cmd.Parameters.Add("@AUTHSTARTDATE", SqlDbType.DateTime).Value = dt;
            cmd.Parameters.Add("@AUTHSTARTDATE", SqlDbType.DateTime).Value = "1/1/2009 04:00:00 PM";
        }Start Free Trial
 
Keywords: Procedure or function 'WriteRef' ex…
 
Loading Advertisement...
 
[+][-]05.20.2008 at 06:38PM PDT, ID: 21611597

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual C#.Net
Tags: Microsoft, Visual Studio 2005, C#, Stored Procedures
Sign Up Now!
Solution Provided By: Solar_Flare
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 - Hierarchy / EE_QW_2_20070628