Page 1 of 1

Overnight build 9.0.1 (19-Nov-2021)

Posted: Fri 19 Nov 2021 15:58
by FredS
First, it would be a good idea to add a build number to those overnight builds. I tend to keep track of compiler directives and errors via:

Code: Select all

 {$IF (Uni.UniDACVersion = '9.0.1') }
    {$DEFINE Issue#40 } 
 {$IFEND}
First run gives me this:

Code: Select all

Error: EVariantTypeCastError: Could not convert variant of type (UnicodeString) into type (Integer)
Error occurs in:

Code: Select all

UniProvider.TEnumeratorOption.GetAsString($D02F6C8)

Code: Select all

Name Value Self ('Protocol', 1024, (TClass($2C8B7A8), TClass($2CCABB8)), 0, (nil,nil),(nil,nil), $2C89D70, 0, 3, True) 
Value 'TCP' Result ''
The call is: (left an old comment in place, not going to waste time to check if that is still valid)

Code: Select all

    if AConnectString.IsEmpty then Connect // Huh, different behavior if you pass in an Empty Str.. What?
    else Connect(AConnectString);
AConnectString:

Code: Select all

'Provider Name=InterBase;Data Source=LOCALHOST;Database=pa.fdb;Client Library=C:\ProgramData\Firebird\fb4_(64)\fbclient.dll;Character Set=UTF8;Protocol=3;Role=RDB$ADMIN;Use Unicode=True;Login Prompt=False;Pooling=True;Min Pool Size=4'
I should add that is an XNET connection, the TCP must come from the threaded connection default value..

Re: Overnight build 9.0.1 (19-Nov-2021)

Posted: Sun 28 Nov 2021 23:52
by FredS
Any new builds?

BTW: this error also occurs with SQL-Server

Re: Overnight build 9.0.1 (19-Nov-2021)

Posted: Mon 29 Nov 2021 16:38
by ViktorV
Hi Fred!,

We have fixed a bug related to the use of ConnectString for the InterBase provider.
This change will be included in the next UniDAC build, which we plan to release next month.

If you need a nightly build, let us know by fulfilling the form: https://devart.com/company/contactform.html

Now, to set a parameter, you just need to specify its name. For example:

Code: Select all

Protocol=Local 
Please give a small sample of a ConnectionString for the SQL Server provider with which you reproduce the error.

Re: Overnight build 9.0.1 (19-Nov-2021)

Posted: Mon 29 Nov 2021 18:21
by FredS
Please give a small sample of a ConnectionString for the SQL Server provider with which you reproduce the error.
Maybe some confusion here, I added XNET just to emphasize that in no way did I change the default Protocol.

Code: Select all

System._RaiseExcept(???)
System.Variants.VarCastError(258,3)
System.Variants.VarResultCheck(???,???,???)
System.Variants.VarToIntAsString($1020F6B8)
System.Variants._VarToInteger($1020F6B8)
UniProvider.TEnumeratorOption.GetAsString($1020F6B8)
Uni.TUniConnection.SetConnectionStringParam(1024,$1020F6B8)
CRConnectionString.TConnectionStringBuilder.SetParamValue($17A78F80,$1020F6B8)
CRConnectionString.TConnectionStringBuilder.ResetParams
CRConnectionString.TConnectionStringBuilder.SetConnectionString('Provider Name=SQL Server;Provider=MSOLEDBSQL.1;Data Source=LOCALHOST;Initial Catalog=PA-Testing;Force Create Database=False;IP Version=ivIPBoth;Authentication=Windows;Login Prompt=False;Pooling=True;Min Pool Size=4')

Re: Overnight build 9.0.1 (19-Nov-2021)

Posted: Wed 01 Dec 2021 12:50
by ViktorV
Hi Fred!

Thanks for the information. We have fixed the error you had indicated. Kindly note that if you use Protocol = 3 in the command line, there will be no error as the default protocol will be used. Therefore, in the new version, to set the protocol you need to specify its name evidently. For example:
Protocol = Local

Best regards,
Viktor

Re: Overnight build 9.0.1 (19-Nov-2021)

Posted: Wed 01 Dec 2021 14:21
by FredS
note that if you use Protocol = 3 in the command line
For the original Firebird example, the main connection uses XNET, The command lines shown are those passed on to the threaded connections. You're not suggesting that I should manually add the protocol to these command lines are you?

Re: Overnight build 9.0.1 (19-Nov-2021)

Posted: Fri 03 Dec 2021 15:15
by ViktorV
Hi Fred,

Thanks for your notes!

We are sorry for the ambiguous interpretation of the term command line: we did not mean the command line itself, but the ConnectString property for the InterBase provider.
If you do not specify the Protocol property in ConnectString, the default value will be used and it will be TCP: https://docs.devart.com/unidac/using-interbase.htm

Please, let us know if you have any questions.

Re: Overnight build 9.0.1 (19-Nov-2021)

Posted: Fri 03 Dec 2021 16:23
by FredS
If you do not specify the Protocol property in ConnectString, the default value will be used and it will be TCP:
TUniConnection needs to generate the correct ConnectString, once I set Protocol=local my part is done.
This should generate an identical ConnectString to pass to the threaded connections to share..

So once again what's the point of this? Surely this fact has been discussed many times..

Re: Overnight build 9.0.1 (19-Nov-2021)

Posted: Tue 07 Dec 2021 15:27
by ViktorV
Kindly be informed that now it will form the corresponding ConnectString in which Protocol=Local will now be included, it will not be as before Protocol=3