Hi,
Please kindly advise me, thanks in advance.
For "SELECT Cnt FROM Table1", SQLQuery1->RecordCount returned 0.
For "SELECT DISTINCT Cnt FROM Table1", SQLQuery1->RecordCount
returned this exception error:-
---------------------------
Debugger Exception Notification
---------------------------
Project ProjectMonitor.exe raised exception class EDatabaseError with message 'DBX Error: Operation Not Supported'. Process stopped. Use Step or Run to continue.
My system setup
---------------------
1. Borland C++ Builder Professional Ver 6.0
2. Microsoft SQL Server 2005
3. dbExpress driver for MS SQL Server (DbxSda version 4.25.8)
My database
----------------
1. Database name = DatabaseTest
2. Table name = Table1
3. Column Name = Cnt, Data Type = int, Allow Nulls = Yes
4. Table1 is empty.
My function
---------------
int TDataMod::SQLQueryOpen(void)
{
int count;
try
{
try
{
SQLQuery1->Close();
SQLQuery1->SQL->Clear();
//SQLQuery1->SQL->Add("SELECT Cnt FROM Table1");
SQLQuery1->SQL->Add("SELECT DISTINCT Cnt FROM Table1");
SQLQuery1->Open();
count = SQLQuery1->RecordCount;
}
catch(const Exception &E)
{
Application->MessageBox(E.Message.c_str(), "Debug", MB_OK);
}
}
__finally
{
SQLQuery1->Close();
}
return(count);
}
Thanks...Yong Seng
DBX Error: Operation Not Supported
-
- Posts: 6
- Joined: Mon 05 May 2008 02:08
DBX Error: Operation Not Supported
Hi Core Lab Team,
Thank you for answering my question.
Please kindly advise how am I able to get the record count if I need to use DISTINCT in my SQL query?
What is the property or function to call?
Thank you.
Have a nice day...Yong Seng
Thank you for answering my question.
Please kindly advise how am I able to get the record count if I need to use DISTINCT in my SQL query?
What is the property or function to call?
Thank you.
Have a nice day...Yong Seng
-
- Posts: 6
- Joined: Mon 05 May 2008 02:08
DBX Error: Operation Not Supported
Hi Core Lab Team,
Thank you for your advises.
It works.
Thanks...Yong Seng
Thank you for your advises.
It works.
Thanks...Yong Seng