Azure SQL connection working on win32, not Android
Posted: Mon 13 Feb 2017 16:08
Hello there.
I've just installed SDAC, anxious to get started
I'm trying to connect to an Azure SQL using the code below.
This works fine when executed on Win32.
However, when I run the same from Android, I get the following error message..
I've tried commenting the line in, where I am setting options.provider to prDirect. But this results in the same error message:
Can anybody help me?
Thanks in advance,
Morten
I've just installed SDAC, anxious to get started
I'm trying to connect to an Azure SQL using the code below.
This works fine when executed on Win32.
However, when I run the same from Android, I get the following error message..
I've tried commenting the line in, where I am setting options.provider to prDirect. But this results in the same error message:
Unknown host 'tcp:mydatabasename.database.windows.net,1433'.
Socket Error Code: 0($0)
Code: Select all
msconnection1.ConnectString:='Server="tcp:mydatabasename.database.windows.net,1433";Initial Catalog=myDB;Persist Security Info=False;User ID=my_login;password=xxxMYPASSWORDxxx;Encrypt=True;TrustServerCertificate=False;';
msconnection1.LoginPrompt:=false;
//msconnection1.Options.Provider:=tmsprovider.prdirect;
msconnection1.open;
caption:='CONNECTED';
with tmsquery.create(nil) do begin
connection:=msconnection1;
SQL.text:='select * from deb_signin';
open;
if not eof then caption:=fieldbyname('info').asstring;
close;
free;
end;
msconnection1.close;
Thanks in advance,
Morten