[fpc-pascal] SQLDB: Set port in TSQLConnector

2021-01-15 Thread Luis Henrique via fpc-pascal
12.01.2021, 06:06, "Michael Van Canneyt via fpc-pascal" 
:
> On Mon, 11 Jan 2021, Virgo Pärna via fpc-pascal wrote:
>
>>  On Fri, 08 Jan 2021 14:25:09 -0300, Luis - SoftSAT Sistemas via fpc-pascal 
>>  wrote:
>>>  I'm trying to connect to a Firebird database with TSQLConnector, but I 
>>> can't
>>>  seem to find a way to set the port number.
>>>
>>>  Looking at TIBConnection, there is a port property, but none in 
>>> TSQLConnector.
>>
>>  You can use
>>  HostName := ServerName/Port;
>
> Port is normally handled using the Params property, so
>
> Params.Values['port']:='1234'
>
> should do.
>
> Michael.
> ,
>
> ___
> fpc-pascal maillist - fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Thanks Virgo and Michael both ways work!
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Value:x:y syntax

2021-02-09 Thread Luis Henrique via fpc-pascal
At https://lists.freepascal.org/pipermail/fpc-devel/2021-February/043569.html I 
saw the syntax "value: x: y".
> str(value:6:3, valuestr);
What is the name of this and where is it documented?
I did tests and saw that Y determines the width of the precision part, but I 
can't see any effect of X.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Value:x:y syntax

2021-02-09 Thread Luis Henrique via fpc-pascal
09.02.2021, 09:15, "Christo Crause" :
> On Tue, Feb 9, 2021 at 2:11 PM Luis Henrique via fpc-pascal 
>  wrote:
>> At 
>> https://lists.freepascal.org/pipermail/fpc-devel/2021-February/043569.html I 
>> saw the syntax "value: x: y".
>>> str(value:6:3, valuestr);
>> What is the name of this and where is it documented?
>> I did tests and saw that Y determines the width of the precision part, but I 
>> can't see any effect of X.
>
> I guess one can call it optional formatting specifiers.  See documentation: 
> https://www.freepascal.org/docs-html/rtl/system/str.html

I think I was lazy and didn't look in the right place, thanks Michael and 
Christo.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] SQLDB: Set MySQL SkipVersionCheck in TSQLConnector

2021-05-14 Thread Luis Henrique via fpc-pascal
Does Anyone known how to set TMySQLConnectionXX SkipVersionCheck property from TSQLConnector? It validates the client version against the server version, which is problematic, as some client libraries are backward compatible and others don't even match any version of the server like(https://downloads.mysql.com/archives/c-c/) which reports the client version as 6. x. My project must support different database vendors/servers so i cannot use TMySQLConnectionXX directly. -- Luis Lima
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] SQLDB: Set MySQL SkipVersionCheck in TSQLConnector

2021-05-14 Thread Luis Henrique via fpc-pascal
14.05.2021, 12:22, "Michael Van Canneyt" :On Fri, 14 May 2021, Luis Henrique via fpc-pascal wrote:  Does Anyone known how to set TMySQLConnectionXX SkipVersionCheck property from TSQLConnector?   It validates the client version against the server version, which is problematic, as some client libraries are backward compatible and others don't even match any version of the server like(https://downloads.mysql.com/archives/c-c/) which reports the client version as 6. x.   My project must support different database vendors/servers so i cannot use TMySQLConnectionXX directly.It currently cannot be done from the TSQLConnector. Although we can probably fix thatby allowing to set this property using the parameters. I will add that.Michael. Thanks Michael. For now i have "solved" the problem in an hacky way. type      THackSQLConnector = class(TSQLConnector)      public        property Proxy;      end;   if THackSQLConnector(fConn).Proxy is TConnectionName then TConnectionName(THackSQLConnector(fConn).Proxy).SkipLibraryVersionCheck:= True; -- Luis Lima___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal