Error:Object must implement IConvertible

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Error:Object must implement IConvertible

    I'm trying to execute a datareader that calls a SQL Server stored procedure
    and I get this error. I also tried loading a dataset using the database
    adapter Fill method and I get the same error.

    I have other ASPNET applications that do these things without a problem.

    Anyone have any suggestions?


    Bob Frasca Guest

  2. Similar Questions and Discussions

    1. Strange error from: Dim myState As Object() = CType(savedState, Object())
      Every book and every website I've seen that talks about how to save state for child controls in a composite webcontrol says to do something like...
    2. Mysterious Error: Object reference not set to an instance of an object
      Hi There! I'm having a mysterious error right after I login using Forms Authentication in my ASP.NET app. Below is the error... Exception...
    3. [DRb] Using DRb to implement object database
      On Fri, 8 Aug 2003, Steve Tuckner wrote: The short answer is that you might get on better looking at the Rinda examples. See...
    4. ERROR:Object must implement IConvertible.
      I'm trying to insert a record into a sql server 2000 database using a store procedure (vs.net is my develop tool) on the button click event but I...
    5. HELP! Error Loading ASPX : Object Reference not set to an instance object
      Hello, When i run my aspx i get this weird error: System.NullReferenceException: Object reference not set to an instance of an object. at...
  3. #2

    Default Re: Error:Object must implement IConvertible

    For the thread...if anyone's interested.

    I resolved this problem. I was passing a parameter to my stored procedure.
    I was incorrectly assigning the value to a "varchar" parameter.

    Incorrect:

    SqlCommandObject.Parameters("@Param").Value = txtTextBox

    Correct:

    SqlCommandObject.Parameters("@Param").Value = txtTextBox.Text

    When it attempted to execute the datareader or the Fill method, SQL Server
    (or was it ADONET) was attempting to convert a text box object to a varchar
    instead of a text string object to a varchar.

    An example of ambiguous naming conventions biting me in the ...


    "Bob Frasca" <bfrasca@netspoke.com> wrote in message
    news:%23NWzojdVDHA.2052@TK2MSFTNGP10.phx.gbl...
    > I'm trying to execute a datareader that calls a SQL Server stored
    procedure
    > and I get this error. I also tried loading a dataset using the database
    > adapter Fill method and I get the same error.
    >
    > I have other ASPNET applications that do these things without a problem.
    >
    > Anyone have any suggestions?
    >
    >

    Bob Frasca Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139