02-05-2020, 08:46 PM
(This post was last modified: 02-05-2020, 09:25 PM by SorenJensen.)
Hi Kudzu,
Can you explain a bit more what any ComInitialization settings cover ? I have set the ComInitialization = ciMultithreaded in ServerController but are otherwise a little in the dark. Which other settings exists ?
In the ADO DBConnection Component, I build the ADO connectionstring, using the Delphi interface, to connect to the database with the usual parameters, but otherwise left all other properties of the DBConnection component as they are. In fact now is the first time I'm looking at other properties apart from loginprompt, and I'm not sure which to change. Currently they are:
Attributes = (all false)
ConnectOptions = coConnectUnspecified
CursorLocation = clUseClient
IsolationLevel = ilCursorStability (this sounds as if it could be a property to change. Many options of which one is ilIsolated. Maybe that is needed.
KeepConnection = true (should that be false?)
LoginPrompt = true (but I'm not asked for a login and it do not appear to have any influence whether it's true or false.The program still connects without asking.
Mode = cmUnknown. Available options do not seem to apply to this.
NB! I have the ADO Connection in UserSession and all Ado Query and Ado StoredProc in datamodules, and in the create of each module, the ADOQuery or ADOStoredproc has it's connection set to UserSession.DBConnection.
Is there anything you will recommend I change ?
Regards
Soren
hi zsleo,
As you can see at the bottom of my reply to Kudzu, I'm seting the connection in the DataModuleCreate of every datamodule as I use the datamodules.
Is that what you mean by manually assigning the connections at runtime ? I do not have any components which have an Open property set at designtime.
Alexandre once recommended using a datamodule for each form with database access, and I have followed that.
Regards
Soren
On my search on Google I have come across MARS, MultipleActiveResultSets, defined as part of the connectionstring. It's described like this:
When true, an application can maintain multiple active result sets (MARS). When false, an application must process or cancel all result sets from one batch before it can execute any other batch on that connection.
Surely a SA HTTP.SYS application servicing multiple users and thereby multiple requests, would be an application that need to maintain multiple active result sets, I guess. Do any of you have any experience with this ?
Can you explain a bit more what any ComInitialization settings cover ? I have set the ComInitialization = ciMultithreaded in ServerController but are otherwise a little in the dark. Which other settings exists ?
In the ADO DBConnection Component, I build the ADO connectionstring, using the Delphi interface, to connect to the database with the usual parameters, but otherwise left all other properties of the DBConnection component as they are. In fact now is the first time I'm looking at other properties apart from loginprompt, and I'm not sure which to change. Currently they are:
Attributes = (all false)
ConnectOptions = coConnectUnspecified
CursorLocation = clUseClient
IsolationLevel = ilCursorStability (this sounds as if it could be a property to change. Many options of which one is ilIsolated. Maybe that is needed.
KeepConnection = true (should that be false?)
LoginPrompt = true (but I'm not asked for a login and it do not appear to have any influence whether it's true or false.The program still connects without asking.
Mode = cmUnknown. Available options do not seem to apply to this.
NB! I have the ADO Connection in UserSession and all Ado Query and Ado StoredProc in datamodules, and in the create of each module, the ADOQuery or ADOStoredproc has it's connection set to UserSession.DBConnection.
Is there anything you will recommend I change ?
Regards
Soren
hi zsleo,
As you can see at the bottom of my reply to Kudzu, I'm seting the connection in the DataModuleCreate of every datamodule as I use the datamodules.
Is that what you mean by manually assigning the connections at runtime ? I do not have any components which have an Open property set at designtime.
Alexandre once recommended using a datamodule for each form with database access, and I have followed that.
Regards
Soren
On my search on Google I have come across MARS, MultipleActiveResultSets, defined as part of the connectionstring. It's described like this:
When true, an application can maintain multiple active result sets (MARS). When false, an application must process or cancel all result sets from one batch before it can execute any other batch on that connection.
Surely a SA HTTP.SYS application servicing multiple users and thereby multiple requests, would be an application that need to maintain multiple active result sets, I guess. Do any of you have any experience with this ?

