|
Questions and Answers
The following is a list of frequently asked questions and answers regarding Diamond ADO.
I hope this will help you to better integrate Diamond ADO into your applications.
- I installed Diamond ADO registered version and still getting "..have not been licensed" message.
- How can I get the Data Link properties dialog shown, in order to allow the user to build his/her own connection string?
- Is there a way to use UDL file for connection properties?
- How to retrieve columns and indexes of the table?
1. I installed Diamond ADO registered version and still getting "..have not been licensed" message.
The problem is in BPL file, which is shared in Windows/System directory.
In order to install a registered version you have to close Delphi/C++Builder first before running setup.exe.
2. How can I get the Data Link properties dialog shown, in order to allow the user to build his/her own connection string?
Use function from unit AdoProp:
function PromptDataSource (ParentHandle: THandle; InitialString: WideString): WideString;
ParentHandle is a handle of parent window. You can usually use 0.
3. Is there a way to use UDL file for connection properties?
Yes. You can assign ConnectionString property of TdADOConnection component manually:
dAdoConnection1.ConnectionString := 'FILE NAME=C:\Program Files\Common Files\System\OLE DB\Data Links\myconn.udl';
4. How to retrieve columns and indexes of the table?
I assume that you have placed TdADOConnection and TdADODataSet on the form and TdADOConnection is connected to the database:
// retrieve Columns info from table Jobs
dADOConnection1.OpenSchema(ad_SchemaColumns, VarArrayOf([Null, Null, 'jobs', Null]), EmptyParam, dAdoDataset1);
// retrieve Indexes from table Jobs
dADOConnection1.OpenSchema(ad_SchemaIndexes, VarArrayOf([Null, Null, Null, Null, 'Jobs']), EmptyParam, dAdoDataset1);
Check ADO help file for description of all parameters of OpenSchema.
|