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

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
TinTin
Posts: 46
Joined: Sat 30 May 2009 14:09

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

Post by TinTin » Sun 14 Nov 2010 14:34

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.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Tue 16 Nov 2010 08:13

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

Post Reply