ADOQuery error,delete record

This is a discussion on ADOQuery error,delete record within the Windows Programming forums, part of the Platform Specific Boards category; Hi i made the above query in BCB 6 but when i run my application brings me an error in ...

  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    43

    ADOQuery error,delete record

    Hi i made the above query in BCB 6 but when i run my application brings me an error in params


    ADOQuery1->Close();
    ADOQuery1->SQL->Clear();
    Edit4->Text=InputBox("Name","Search:","");

    ADOQuery1->SQL->Add("DELETE FROM Charl WHERE PictureName='"+Edit4->Text+"'");

    ADOQuery1->Params->Items[0]->AsString= ADODataSet1->FieldByName("Leite")->AsString;
    ADOQuery1->Prepared=true;
    ADOQuery1->ExecSQL();

    ADODataSet1->Refresh();

    what is wrong???

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    What line? what is exact the error message
    Have you checked all names used like
    Charl
    PictureName
    Leite

    Do you have the table, column and field with these names?
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    Registered User
    Join Date
    Jul 2006
    Posts
    43
    Yes thats the table and the errors i got one in ADOQuery->Parameters say that its no right...If i leave that outside the code then my application run the query but brings me an error that say "Value of key on this record havechange or deleted in place that record saved"
    The strange thing is that when i press ok in error the query delete the record as i want...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with binary file c++
    By lucky_mutani in forum C++ Programming
    Replies: 4
    Last Post: 06-05-2009, 09:24 AM
  2. Inventory records
    By jsbeckton in forum C Programming
    Replies: 23
    Last Post: 06-28-2007, 04:14 AM
  3. updating and deleting a record
    By Burritt in forum C Programming
    Replies: 2
    Last Post: 04-19-2003, 04:58 PM
  4. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM
  5. behind and confused
    By steviecrawf in forum C Programming
    Replies: 1
    Last Post: 11-09-2001, 11:51 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21