Hi
I Change the language to "deutsch" with SQL "SET language deutsch". I read that this language is valid during the session. Now I have the problem that suddenly my app "forgets" this setting and I get an error using a query with a date. I never close the connection (made a ShowMessage in "onDisconnect". So my question is: when is a session closed or what can be the problem? Thanks, Peter
SQL Server, what is a session?
-
AndreyZ
Re: SQL Server, what is a session?
Hello,
1. To set the SQL Server language name, you should set the Language SQL Server specific option. Here is a code example:
For more information, please refer to the "UniDAC and SQL Server" article in the UniDAC documentation.
2. In UniDAC, session means TUniConnection. Whilst TUniConnection is opened and the language is set, it will be used by SQL Server for this session. If TUniConnection is not closed, it means that the problem occurs because there is another call of the "SET LANGUAGE" statement within the connection. Make sure you do not call the "SET LANGUAGE" statement somewhere else in your application.
1. To set the SQL Server language name, you should set the Language SQL Server specific option. Here is a code example:
Code: Select all
UniConnection.SpecificOptions.Values['Language'] := 'Deutsch';
UniConnection.Open;2. In UniDAC, session means TUniConnection. Whilst TUniConnection is opened and the language is set, it will be used by SQL Server for this session. If TUniConnection is not closed, it means that the problem occurs because there is another call of the "SET LANGUAGE" statement within the connection. Make sure you do not call the "SET LANGUAGE" statement somewhere else in your application.