|
예를 들어서 Table에 Id가 test1 이 있을때 이것을 test2로 update 하려고 할때
query->Close();
query->SQL->Clear();
query->SQL->Add("update Table set Id = 'test2'");
query->SQL->Add("where Id = 'test1'");
query->ExecSQL();
위와 같이 하면 잘 들어갑니다.
Edit 안에 값으로 수정할때는 어떻게 해야 하는지요?
Edit1->Text = "test2";
Edit2->Text = "test1";
위에서
query->SQL->Add("update Table set Id = 'test2'");
query->SQL->Add("where Id = 'test1'");
대신에
query->SQL->Add("update Table set Id = Edit1->Text");
query->SQL->Add("where Id = Edit2->Text");
식으로 바꾸면 에러가 납니다.
|