Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Interesting issue

Interesting issue

Scheduled Pinned Locked Moved ASP.NET
databasehelpquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cisco2103
    wrote on last edited by
    #1

    Has anyone had any trouble with concatenation with the new 2.0 framework. Here is the scenerio. We are migrating our site from 1.1 to 2.0 and I am working out some bugs and found this to really funny. UnitStr += sdr("UnitID") UnitStr is defined a string and sdr("UnitID") is pulled from the database as an integer. In the 1.1 framework(VS2003) it allows it to conncatenate but the 2.0(VS2005) it gives me a "input string is invalid", "Conversion from string "" to type 'Double' is not valid.". The funny thing it shows as an integer in the table and when you watch the variable. Any one have any ideas? Keep putting the pieces of the puzze together. Thats a programmer!@

    K 1 Reply Last reply
    0
    • C cisco2103

      Has anyone had any trouble with concatenation with the new 2.0 framework. Here is the scenerio. We are migrating our site from 1.1 to 2.0 and I am working out some bugs and found this to really funny. UnitStr += sdr("UnitID") UnitStr is defined a string and sdr("UnitID") is pulled from the database as an integer. In the 1.1 framework(VS2003) it allows it to conncatenate but the 2.0(VS2005) it gives me a "input string is invalid", "Conversion from string "" to type 'Double' is not valid.". The funny thing it shows as an integer in the table and when you watch the variable. Any one have any ideas? Keep putting the pieces of the puzze together. Thats a programmer!@

      K Offline
      K Offline
      Kschuler
      wrote on last edited by
      #2

      try using &= instead of +=

      -------------------------------------------------- Play Nation States and join The Code Project region with the password: byalmightybob

      R 1 Reply Last reply
      0
      • K Kschuler

        try using &= instead of +=

        -------------------------------------------------- Play Nation States and join The Code Project region with the password: byalmightybob

        R Offline
        R Offline
        RichardGrimmer
        wrote on last edited by
        #3

        I'd say not to use EITHER....look for String concatenation memory c# in google. The suggestion is to use the StringBuilder class....

        "Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox

        K 1 Reply Last reply
        0
        • R RichardGrimmer

          I'd say not to use EITHER....look for String concatenation memory c# in google. The suggestion is to use the StringBuilder class....

          "Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox

          K Offline
          K Offline
          Kschuler
          wrote on last edited by
          #4

          Yeah. Good call.

          -------------------------------------------------- Play Nation States and join The Code Project region with the password: byalmightybob

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups