i wasn't done yet
Does anyone knows how to edit a value in the dataset of a TQuery? i wrote the following code but somehow it doens't work and i dont know why...
TQuery *query = new TQuery(Form1);
query->DatabaseName = "HELPDESK";
query->SQL->Add("select SOMEVALUE from SOMETABLE");
query->Open();
query->Edit();
while(!query->Eof) {
if(query->FieldByName("SOMEVALUE")->AsInteger == 100000) {
query->FieldByName("Werkpleknummer")->AsString = "DFOGK";
}
query->Next();
}
datasource->DataSet = query;
My program crashes when it comes to the line query->Edit(); It returns the following error "Can modify a read only dataset"
I allready tried to set query->RequestLive = true but that doens't seem work...