#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2010
    Posts
    2
    Rep Power
    0

    Conversion failed when converting the varchar value '230. ' to data type int.


    I am getting an error of

    Conversion failed when converting the varchar value '230. ' to data type int.


    I have not changed any code, and it worked yesterday. Any ideas?

    Note: Not an admin, I was handed this "position" because they don't want to pay an actual admin actual money. So sorry if this problem is stupid or anything.
  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,205
    Rep Power
    4279
    could you show the actual statement that received this error message
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2010
    Posts
    2
    Rep Power
    0
    It's some stored procedure thing?

    <asp:SqlDataSource ID="sds1" runat="server" SelectCommand="usp_AccountTestingThis" ConnectionString="Data Source=blahblah\blahblah;Initial Catalog=AccountRegistration;User Id=Userid;Password=Password;" SelectCommandType="StoredProcedure">
    <SelectParameters>

    <asp:QueryStringParameter Name="AccountID" QueryStringField="aid" />


    </SelectParameters>
  6. #4
  7. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,205
    Rep Power
    4279
    you posted this in the mysql forum but it looks like you have a problem with asp passing a value to a stored procedure properly

    i'll move the thread to the asp forum for you
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  8. #5
  9. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,443
    Rep Power
    4539
    I have no clue, sorry. Maybe this google search will help

    http://www.google.com/search?q=%22Co...ient=firefox-a
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    4
    Rep Power
    0
    Not sure of the specifics of your situation, but it seems to be a casting problem. Maybe you could try using the static class 'Convert' to do the job.

    eg: Convert.ToInt32(row["TableColumnName"]);

IMN logo majestic logo threadwatch logo seochat tools logo