Page 1 of 1

How to Config Connection Options By Visual-For in run-time?

Posted: Sun 14 Nov 2010 14:34
by TinTin
SomeTimes we dont config Connection Options in design-time,but need to config connection options in run-time,such as,I want to config interbase connection options on Visual-Form in run-time,config the options(charset/sqldialect/useunicode/chartlength...etc).Which method of TUniConnection to call it?mybe you can provider "save as " action to save config file.

Posted: Tue 16 Nov 2010 08:13
by AlexP
Hello,

To set the TUniConnection properties in run-time run-time you can use the following code:

UniConnection1.SpecificOptions.Values['UseUnicode']:=booltostr(CheckBox1.Checked,true);

to save and load properties you can use the SaveToFile and the LoadFromFile methods methods of TUniConnection.SpecificOptions