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. Database & SysAdmin
  3. Database
  4. Despair :( - ODBC Behaves differently in COM+ Application [modified]

Despair :( - ODBC Behaves differently in COM+ Application [modified]

Scheduled Pinned Locked Moved Database
comhelpquestionannouncement
2 Posts 1 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.
  • B Offline
    B Offline
    BillyGoatGruff
    wrote on last edited by
    #1

    I have written a data access layer running under com+ Using the IBM Informix ODBC driver, I am able to select from a table with no problems, when I attempt to updtate the table, the error I receive is "Invalid string or buffer length" (all my googling seems to indicate that this message may have something to do with parameters) I have set up a test application that performs identical operations to the com+ app. These are: . Open Connection . Create a select command . Fill dataset adapter using select command and adapter . Alter 1 single field in a single row . Create an update command . Call adapter.update Now here's the weird thing. The test app works fine, the com+ app fails. When I compare the SQLTrace between the 2 applications. The test application which works, generates many, many more ODBC instructions than the failing com+ app. Each application is performing the identical workload through the same driver using the same the system.data.odbc objects. Does anybody have any ideas? I've been banging my head against this for a while now and have no idea what to try next. Much thanks. -- modified at 3:35 Wednesday 10th January, 2007

    B 1 Reply Last reply
    0
    • B BillyGoatGruff

      I have written a data access layer running under com+ Using the IBM Informix ODBC driver, I am able to select from a table with no problems, when I attempt to updtate the table, the error I receive is "Invalid string or buffer length" (all my googling seems to indicate that this message may have something to do with parameters) I have set up a test application that performs identical operations to the com+ app. These are: . Open Connection . Create a select command . Fill dataset adapter using select command and adapter . Alter 1 single field in a single row . Create an update command . Call adapter.update Now here's the weird thing. The test app works fine, the com+ app fails. When I compare the SQLTrace between the 2 applications. The test application which works, generates many, many more ODBC instructions than the failing com+ app. Each application is performing the identical workload through the same driver using the same the system.data.odbc objects. Does anybody have any ideas? I've been banging my head against this for a while now and have no idea what to try next. Much thanks. -- modified at 3:35 Wednesday 10th January, 2007

      B Offline
      B Offline
      BillyGoatGruff
      wrote on last edited by
      #2

      The bug was caused by me having only one pair of eyes. Adding another 2 eyes to the code revealed... That If you use the ODBCParameter object, and the sourceColumn property contains a leading space... Things don't work.

      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