SELECT Bug with TkbmMemTable

Discussion of open issues, suggestions and bugs regarding Virtual Data Access Components for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Aggie85
Posts: 85
Joined: Wed 11 Nov 2015 17:03

SELECT Bug with TkbmMemTable

Post by Aggie85 » Sat 12 Aug 2017 18:25

Howdy All!

If I

1) Create a simple TkbmMemTable with fields Enabled (Boolean) and RateCodeID (Integer),
2) Fill it with a single record with values Enabled = True,RateCodeID = 1,
3) Attach it to a TVirtualQuery, and issue the the following SQL statement:

SELECT Enabled FROM Test WHERE RateCodeID = 1

TVirtualQuery returns an empty data set.

4) If I use the TkbmMemTable's Locate() method, it finds the record. See sample test code below:

// Add SINGLE record
TestTable_->Insert();
TestTable_->FieldValues[L"Enabled"] = true;
TestTable_->FieldValues[L"RateCodeID"] = 1;
TestTable_->Post();

// Locate record
if (TestTable_->Locate(L"RateCodeID",1,TLocateOptions()) == false)
{
OutputDebugString(L"Locate failed!");
}

// See if TVirtualQuery can perform a SIMPLE SQL statement
VirtualQuery_->SQL->Text = L"SELECT Enabled FROM Test WHERE RateCodeID = 1";
VirtualQuery_->Open();
if (VirtualQuery_->IsEmpty() == true)
{
OutputDebugString(L"Test failed!");
}

All the best,

Aggie85

MaximG
Devart Team
Posts: 1030
Joined: Mon 06 Jul 2015 11:34

Re: SELECT Bug with TkbmMemTable

Post by MaximG » Tue 15 Aug 2017 14:52

Thank you for the information. We have reproduced the problem and fixed the bug. The fix will be included in the next VirtualDAC build. The links to download VirtualDAC night build with the made fixes were sent to your email

Aggie85
Posts: 85
Joined: Wed 11 Nov 2015 17:03

Re: SELECT Bug with TkbmMemTable

Post by Aggie85 » Tue 15 Aug 2017 15:09

Howdy Maxim,

I haven't received any updated links.

All the best,

Aggie85

MaximG
Devart Team
Posts: 1030
Joined: Mon 06 Jul 2015 11:34

Re: SELECT Bug with TkbmMemTable

Post by MaximG » Tue 15 Aug 2017 15:45

Please check your email again

Post Reply