If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > [BORLAND C++] Question about Datasources

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-06-03, 04:23
kneet kneet is offline
Registered User
 
Join Date: Nov 2003
Location: The Netherlands
Posts: 2
[BORLAND C++] Question about Datasources

Hi...

I have a problem with datasources.
Reply With Quote
  #2 (permalink)  
Old 11-06-03, 04:37
kneet kneet is offline
Registered User
 
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...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On