Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Location
    The Netherlands
    Posts
    2

    Unanswered: [BORLAND C++] Question about Datasources

    Hi...

    I have a problem with datasources.

  2. #2
    Join Date
    Nov 2003
    Location
    The Netherlands
    Posts
    2
    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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •