Thread: Odbc Driver Error?

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    8

    Odbc Driver Error?

    Hi,

    I have a thread in a C++ dll that inserts records into an SQL database (inside a while loop). Sometimes, depending on the records, it is able to finish inserting all records (exits the loop with no problems). Other times, it inserts say only 3 or 4 records and returns the following error:

    Error : -2147217887 Msg:" IDispatch Error #3105 The requested properties can not be supported"

    Have any of you guys encountered this problem??
    I tried different lock types for openeing the recordset (when retrieving records to insert elsewhere).

    Any help would be graciously appreciated.

    Thanks.

    Ryan

  2. #2
    Registered User
    Join Date
    Feb 2002
    Posts
    329
    Are you sure all your input is valid?

  3. #3
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Originally posted by knutso
    Are you sure all your input is valid?
    to expand on what knutso is saying, are you sure your not violating any of your SQL table constraints. ie) proper data types, data within specified domains, foreign keys exist....

  4. #4
    Registered User
    Join Date
    Jun 2003
    Posts
    8

    HELP

    yes, the data fields are correct as it is able to insert more than 1 record each time. I believe that it could be that the cmd is trying to execute before the previous one is done 'inserting' (but how could this be possible, if it must loop once and then loop again to reach the next 'insert')???

  5. #5
    Registered User
    Join Date
    Feb 2002
    Posts
    329
    Are you running SQLEndTran before the next insert? If not, the last insert wasn't commited..

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 04:09 AM
  2. how do you resolve this error?
    By -EquinoX- in forum C Programming
    Replies: 32
    Last Post: 11-05-2008, 04:35 PM
  3. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM
  4. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 10:52 PM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 01:10 AM