•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Pascal and Delphi section within the Software Development category of DaniWeb, a massive community of 402,955 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,901 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Pascal and Delphi advertiser: Programming Forums
Views: 1289 | Replies: 12
•
•
Join Date: Mar 2008
Posts: 13
Reputation:
Rep Power: 0
Solved Threads: 0
Well... I could copy the data, and use that, but that would be very slow, and I would have to copy often and a lot. I have a table where records depends on another one. Still, it will be the backup if I can't solve this.
So every time I try to move the active record from inside the OnCalcField event I get a lot of some veird EOleException invalid argument error, even when I don't even read or write any data. I know, I must restore the dataset at the end of the event, as I do every time before EnableControls.
This is my event:
When I try to uncomment the 2 lines it throws the errors, but I can't even catch it. If something handles the error, it couldn't become recursive because qwe prevents it. And I've already tryed with GotoBookmark and First, in case eof would cause this, but it's the same.
Also I can't find anything on google, so it would be nice if somebody could only show me a working example.
Thanks!
So every time I try to move the active record from inside the OnCalcField event I get a lot of some veird EOleException invalid argument error, even when I don't even read or write any data. I know, I must restore the dataset at the end of the event, as I do every time before EnableControls.
This is my event:
delphi Syntax (Toggle Plain Text)
procedure TForm1.calc(DataSet: TDataSet); begin try Dataset.FieldByName('Calc').AsInteger:=10; if qwe then exit; qwe:=true; dataset.DisableControls; //dataset.next; //if not dataset.Eof then dataset.prior; dataset.EnableControls; ListBox1.AddItem(Dataset.FieldByName('SampleNum').AsString,nil); qwe:=false; except showmessage('This never shows!'); ADOQuery1.OnCalcFields:=nil; end; end;
Also I can't find anything on google, so it would be nice if somebody could only show me a working example.
Thanks!
•
•
•
•
•
•
•
•
DaniWeb Pascal and Delphi Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the Pascal and Delphi Forum
- Previous Thread: using method or dereferenced object pointer
- Next Thread: txt files in pascal



Threaded Mode