Page 1 of 1

SELECT Bug with TkbmMemTable

Posted: Sat 12 Aug 2017 18:25
by Aggie85
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

Re: SELECT Bug with TkbmMemTable

Posted: Tue 15 Aug 2017 14:52
by MaximG
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

Re: SELECT Bug with TkbmMemTable

Posted: Tue 15 Aug 2017 15:09
by Aggie85
Howdy Maxim,

I haven't received any updated links.

All the best,

Aggie85

Re: SELECT Bug with TkbmMemTable

Posted: Tue 15 Aug 2017 15:45
by MaximG
Please check your email again