Mega Code Archive

 
Categories / Delphi / ADO Database
 

How do i change a specific idapi configuration setting

Question: How do I change a specific IDAPI configuration setting? How do I know the current settings? Answer: The settings change depending on the database or server. To find the current settings, you can display the TStringList returned from GetAliasParams in a TMemo, then you can modify the alias by replacing specific indexed strings within the TStringList. void __fastcall TForm1::Button1Click(TObject *Sender) { TSTringList MyList; MyList = new TStringList(); Session1->GetAliasParams('DBDEMOS', MyList); Session1->Memo1->Lines->Assign(MyList); Session1->MyList->Strings[0] = "PATH=d:\\borland\\BCB\\Demos\\Data'; Session1->ModifyAlias('DBDEMOS', MyList); delete MyList; }