DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: ADO Command Object

  1. #1
    Join Date
    Aug 2004

    ADO Command Object

    [Originally posted by Steve Letford]

    I've got a problem with the command object:
    I set the object and add the parameters and the command text which is an insert statement into a database.

    Then I go through a loop and change the parameter values and do an execute.

    After I have executed the comm object once successfully it fails on the next execute saying data mismatch.

    Has anyone had a similar problem and can help me.



  2. #2
    Join Date
    Aug 2004

    Re:ADO Command Object

    [Originally posted by bejjudevdu]

    Hi there,
    If you are using loop then you should not forget to give parameter. Check the value of parameter in the loop in debugging mode.
    Give me the code to check.
    Thank you

  3. #3
    Join Date
    Aug 2004

    Re:Re:ADO Command Object

    [Originally posted by Ed Ardzinski]

    Hi Steve!

    Yeah post some code...I'm on vacation, so I'll be scarce for the next few days, but e-mail me an I will take a look.

    On the surface, I have never had sucess using the the parameter object...rather I've kept most of my "parameter" passing work in the sonstruction of the SQL statement I need to use. Then I can use the values of common controls (text boxs, list boxes, etc) or public variables to create the flexibility. When executing int he loop I just make sure I close the connection object after executing the command.

    I don't know if you've used the Data Report much...what you described seems eerily similar. The DR will work the first time you use it, but most encounter problems trying to display the report with different data...

    Give a ring!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center