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
    Posts
    43,023

    ADO Command Object

    [Originally posted by Steve Letford]

    Hi,
    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.

    Thanks

    Steve

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    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
    Posts
    43,023

    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!

    Edski

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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

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