使用TSQLConnection组件,如果我将Driver属性设置为DataSnap有没有办法在代码中手动设置该驱动程序的属性?
例如CommunicationProtocol或CommunicationIPVersion.
任何帮助,将不胜感激.
谢谢,
嗯,SilverWarior描述的并不是那么简单.问题是这些属性是特定于驱动程序的,不能直接从TSQLConnection访问.好的,这是一种方式:
var
dbxProps: TDBXDatasnapProperties;
begin
Assert(SQLConnection1.DriverName = 'DataSnap', 'Driver must be DataSnap');
dbxProps := SQLConnection1.ConnectionData.Properties as TDBXDatasnapProperties;
dbxProps.CommunicationProtocol := 'tcp/ip';
dbxProps.CommunicationIPVersion := 'IPv6';
end;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2049 次 |
| 最近记录: |