07-21-2019, 07:23 AM
Hi Guys,
I'm trying out the new SA httpsys option, and it works really nice. However, I do have some strange and unexpected behavior I hope some of you could explain or help point me in the right direction:
First:
I have a small test application with a datamodule with an ADOConnection and an ADOTable. Connection points to the MSSQL server and is set to Windows authentication, and testconnection work fine. However, I do not set the Connected property nor the Active property on the table. In unit1 I have a listbox and in Formshow, a call to a procedure "ShowMenu" listing the content of adotable.
The unexpected behavior is that the application do show the content of the table in the listbox, despite me not calling the adoconnection.open method, nor setting the connected property. Even if I tick LoginPrompt (without a onlogin event), it still connects silently. Only when I change authentication to SQL user, provide a name but no password, it will not connect. Instead I get an error "Colinitiate has not been called!".
The above test is when run with visible GUI. Why do it connect even though I have not set the Connected property nor called the Open method ?
Second:
When setting the connection properties as supposed, recompiling it as a service, installing it on the target machine, and trying to call it in the browser, I do get the unit1 form up on the screen, but with no data (not even those simple iwlabel1.caption := 'test'
, and the procedure to open the table and show the contents in the listbox, fails with an access violation error.
So the same program works fine as GUI, but fails as a Service. I suppose it is an authentication problem, where the service runs with another user than the one logged on to windows, but not even when entering the SQL user and password in the ADOconnection, do it work. It is the same whether the service is installed locally on the SQL server, or on the development pc.
I hope someone else have had the same problem and have found a solution.
I'm trying out the new SA httpsys option, and it works really nice. However, I do have some strange and unexpected behavior I hope some of you could explain or help point me in the right direction:
First:
I have a small test application with a datamodule with an ADOConnection and an ADOTable. Connection points to the MSSQL server and is set to Windows authentication, and testconnection work fine. However, I do not set the Connected property nor the Active property on the table. In unit1 I have a listbox and in Formshow, a call to a procedure "ShowMenu" listing the content of adotable.
The unexpected behavior is that the application do show the content of the table in the listbox, despite me not calling the adoconnection.open method, nor setting the connected property. Even if I tick LoginPrompt (without a onlogin event), it still connects silently. Only when I change authentication to SQL user, provide a name but no password, it will not connect. Instead I get an error "Colinitiate has not been called!".
The above test is when run with visible GUI. Why do it connect even though I have not set the Connected property nor called the Open method ?
Second:
When setting the connection properties as supposed, recompiling it as a service, installing it on the target machine, and trying to call it in the browser, I do get the unit1 form up on the screen, but with no data (not even those simple iwlabel1.caption := 'test'

So the same program works fine as GUI, but fails as a Service. I suppose it is an authentication problem, where the service runs with another user than the one logged on to windows, but not even when entering the SQL user and password in the ADOconnection, do it work. It is the same whether the service is installed locally on the SQL server, or on the development pc.
I hope someone else have had the same problem and have found a solution.