Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us
Absolute DB FAQ
Previous  Top  Next



1. How to speedup bulk inserts?

You can speedup bulk inserts by using transactions:
AbsDB.StartTransaction;
...insert data...
AbsDB.Commit(False);


2. How to perform SELECT from multiple databases?

Use database name prefix with the table name to specify a table from another database.
table_reference ::= "databasefilename.abs".table_name
Example:
SELECT * from "c:\Demos\Data\DBFishes.abs".biolife

For in-memory tables, precede table name with the MEMORY keyword:
select * from MEMORY mytable


3. I have this kind of problem during the installation of Absolute Database:
the system returns this message "Setup was unable to find IDE (Delphi or C++ Builder)"


The Absolute Database is designed to be used primarily by Borland Delphi or C++ Builder developers. If you haven't one of these programs installed on your computer, you'll not be able to use the Absolute DB with its full power.


4. When I try to compile your demo applications or blank form with your components, I get compiler error:
[Fatal Error] File not found: 'C:\Program Files\ComponentAce\AbsoluteDatabase\Lib\Delphi
7\ABSMain.pas'


Most probably you use Trial or Personal edition of Delphi. These editions are not supported by Absolute DB. This error occurs because the ABSMain.dcu was created using commercial Delphi edition, and your edition tries to recompile ABSMain but the source (.pas) file cannot be found as the Personal version of Absolute DB is distributed without source code.


5. Running the following code I get the following exception message:
"Error creating table handle - Native error: 2001"
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Query->SQL->Text = "INSERT INTO friends(name) VALUES ('Joseph') " ;
Query->Open();
}

INSERT, UPDATE, and other queries which don't return any data must be called by
TABSQuery->ExecSQL() method instead of TABSQuery->Open().


6. If client computer crashes, the database file will be corrupted?

Database file will be corrupted only if the client computer will crash during writing to the database file. This problem has a few chances to happen, but in this case, the database will be auto-repaired on the next database opening.
If application attempts to open a database file for the first time and data corruption is detected, then TAbsDatabase.OnNeedRepair event is fired, so you can do necessary actions to inform user about repair. Database file could be also repaired manually using TABSDatabase.RepairDatabase.


7. Trying to execute a query like

select * from MyTable order by Field1 group by Field2

I got an error: "End of SQL command expected, but 'group' found at line 3, column 1 - Native error: 20260"


The ORDER BY clause must be placed after GROUP BY:

SELECT
...
FROM from_item [, ...]
[ WHERE condition ]
[ GROUP BY { column_name | expression } [, ...] ]
...
[ ORDER BY { unsigned_integer | column_name } [ ASC | DESC ] [, ...] ]


8. Will it be difficult to convert my BDE app to Absolute ?

No. Absolute is fully compatible with BDE components, so you'll just need to replace TTable, TQuery, TDatabase, TSession components with TABSTable, TABSQuery and so on. See How to Migrate from the BDE for more details.


9. Which Query Builder can I use to work with Absolute Database?

It can be found here: http://www.korzh.com/delphi/sq/



10. The query

select group, data from table

seems to be correct but when I run it, I get the error

"Expression expected, but 'group' found".

Is it because "group" is reserved word? What I can do to avoid this error?


Yes, the error occurs as GROUP is a reserved word. To avoid this error, enclose field name with the square brackets:

select [group],data from table


11. You labeled yourself as a Borland Technology Partner. What does it means to us?

It means for you is that our company will have early access to Delphi Betas, so we can provide smooth updates when the next version of Delphi is released.


12. Has anyone developed a DADE interface for ReportBuilder yet?

Yes, you can download it from http://www.componentace.com/AbsoluteDB_Addons.htm


1
3. How to set a value of a ftLargeInt field?

TLargeIntField(FieldByName('My_LargeInt_Field')).Value := MyLargeInt;.


1
4. How to uninstall Absolute DB?

1.Delete the Absolute Database folder completely  
2.Delete all vclAbsDB*.* files from Windows\system32 folder.  


1
5. On this computer there are several users, the Delphi is installed only by my
user. I failed as I tried to install the Absolute database with another user.

Please install Absolute DB with the user which have Delphi installed..


1
6. How can I check whether the database is opened by only one user or more?

Please use the following code:

ABSDatabase1.Close;
ABSDatabase1.Exclusive := True;
try
ABSDatabase1.Open;
// sole user mode
ShowMessage('single user');
except
// another users are connected
ShowMessage('multiuser mode');
end;.


1
7. Both TCloseAction & TCompressionAlgorithm use "caNone" and this is confusing the
complier, how to solve this problem?

In this case you'll need to explicitly specify the unit where a constant is
defined by using the name of the unit preceding the constant.
The unit name is separated by a dot from the identifier:
// compression algorithm
AdvFieldDef.BlobCompressionAlgorithm := ABSMain.caNone
// close action
Action := Forms.caNone


18. What is the "primary key" for?

The primary key constraint specifies that a column may contain only unique
(non-duplicate), nonnull values. Technically, PRIMARY KEY is merely a
combination of UNIQUE and NOT NULL, but identifying a set of columns as primary
key also implies that other tables may rely on this set of columns as a unique
identifier for rows.
Only one primary key can be specified for a table, whether as a column
constraint or a table constraint.


19. What is the "unique key" for?

The UNIQUE constraint specifies that a column of a table may contain only unique
values.
For the purpose of a unique constraint, null values are considered equal.



20. How do I speedup a query with a condition like WHERE Field1 = 'Value' OR Field2
= 'Value' ?

Absolute DB cannot use indexes for OR conditions. You can speedup your
query by creating indexes for each field and by using a UNION operator instead
of using OR condition:

SELECT ... WHERE table.f1 = 'Value'
UNION
SELECT ... WHERE table.f2 = 'Value'



21. I would like to know if in absolute database exists function that it
returns number from days between dates?

You can use a query like the following to get the number of days
between two dates:

SELECT ABS(CAST(d1 as INTEGER) - CAST(d2 AS INTEGER)) FROM table1.

where d2 and d1 are date/datetime fields.

        © 2003 - 2017 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Mar 26, 2017