Can't get TAdsConnection to accept run-time data location assignment
Posted on 2011-03-22
I am using Delphi XE with Advantage local server (9.1) on Windows 7. I do not know the data table location until run-time and so have code that assigns the ConnectPath and IsConnected properties during the creation of the data module. However, I keep getting the following error message:
Exception EADSDatabaseError in module DD3CRMOut.exe at 0048AAB4. acctTbl: One of the DatabaseName property or the AdsConnection property must have a value.
acctTbl is the first table in the data module. The table has a value in the AdsConnection property (Which is the name of the AdsConnection) and the Active property is set to false.
The AdsConnection ConnectPath property is null and the IsConnected property is set to false.
If I enter a location that has a table in the ConnectPath property of AdsConnection, the error messages go away (even though the IsConnected property is still false).
I need to be able to provide the data location only at run-time. How do I do this?