Results 1 to 2 of 2

Thread: Sudden error using web developer 2008 express

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    245

    Sudden error using web developer 2008 express

    Hi all

    I have a login page that calls a simple stored proc to process the user and password against a table. It was working perfectly fine last night and now suddenly i receive this message in regards to the password field:

    [InvalidCastException: Failed to convert parameter value from a WindowsPrincipal to a String.]
    the parameter is declared as:

    Code:
    Sql.Parameters.Add("@_iPassword", SqlDbType.VarChar, 40)
            Sql.Parameters("@_iPassword").Value = txtPassword.Text
    What would suddenly cause a perfectly working call to this procedure to fail?

    Thanks

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Sudden error using web developer 2008 express

    Are you absolutely sure that that is where the exception is thrown? I doubt that it actually is.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width