Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 27 Apr 2024, 06:19

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 31 Jan 2013, 13:17 
Offline

Joined: 31 Jan 2013, 13:05
Posts: 17
Hi. I have a problem. I am beginner in use of ehlib 5.6, i use dbgrideh and memtableEh(MTCorectie)

qCorectie is a TQuery work with dbf, and i want to load MTCorectie, to use the sort/filter options of dbgrideh

MTCorectie have no fields in design, i want to load the structure from qCorectie.

First time, the code work.
MTCorectie->Close();
MTCorectie->LoadFromDataSet(qCorectie,-1,lmCopy,false);
MTCorectie->Open();

After one operation in DBF append/update, i make a new selection with qCorectie and i want to load again MTCorectie with the same
MTCorectie->Close();
MTCorectie->LoadFromDataSet(qCorectie,-1,lmCopy,false);
MTCorectie->Open();

In this moment, BIG ERROR in MTCorectie->Close();
Cannot perform this operation on a closed dataset. :(

If delete MTCorectie->Close();
appear the same error in MTCorectie->LoadFromDataSet

Where is the problem...first time work, filled the table, but second time crash?
Please help. Thanks.


Top
 Profile  
 
PostPosted: 01 Feb 2013, 08:44 
Offline

Joined: 31 Jan 2013, 13:05
Posts: 17
The source:


SourceQuery_DBF->Active = false;
SourceQuery_DBF->DatabaseName = ExtractFilePath(ParamStr(0));
SourceQuery_DBF->SQL->Clear();
AnsiString XX="";
XX =" SELECT * FROM T.DBF ";
SourceQuery_DBF->SQL->Text = XX;
SourceQuery_DBF->Active = true;

MTCorectie->DisableControls();
MTCorectie->Close();
MTCorectie->LoadFromDataSet(SourceQuery_DBF,-1,lmCopy,false);
MTCorectie->Open();
MTCorectie->EnableControls();

MTCorectie without fields...First Time work, second time crash.

if i use

MTCorectie->Close();
MTCorectie->LoadFromDataSet(SourceQuery_DBF,-1,lmCopy,false);
MTCorectie->Open();

without DisableControls, enableControl;s..IT WORK'S!!!!


Top
 Profile  
 
PostPosted: 05 Feb 2013, 21:49 
Offline
Администратор

Joined: 22 Dec 2011, 20:19
Posts: 335
Hello

We can't reproduce any error in a similar project.
Could you create a Demo project and send it to the forum or support@ehlib.com

Best regards
Admin

_________________
Best regards
Admin


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 47 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group