Hi,
I've no installation of sql express edition, but I need a compilation for that. How are the configuration parameters for TMSConnection component to connect to SQL Server Express with windows authentication?
Thanks.
connection to SQL Server 2005 Express
Does it work with localhost as server name?? (Nothing with .\SQLExpress... like .NET connection?)Dimon wrote:To connect to SQL Server Express you should set the same TMSConnection properties as for standard SQL server, like this: Server, Database, Username, Password.
To use Windows authentication you should set the TMSConnection.Authentication property to auWindows.
Can you give me a sample how I can read the connection params at runtime (especially which event should be used to read the params an what file type should it be)?
Yes, for this you can set the TMSConnection.Server property to '.\SQLExpress'.Cogito wrote:Does it work with localhost as server name?? (Nothing with .\SQLExpress... like .NET connection?)
Please specify what params do you mean?Cogito wrote:Can you give me a sample how I can read the connection params at runtime (especially which event should be used to read the params an what file type should it be)?
Please specify what params do you mean?[/quote]Cogito wrote:Can you give me a sample how I can read the connection params at runtime (especially which event should be used to read the params an what file type should it be)?
I mean the logon parameter (server, database etc..). Is an ini-file ok or xml and when should they be read, in the oncreate event of datamodul?
To set the connection parameters at run-time you can use the following code:
TMSConnection does not allow to read connection parameters from file or from registry, but you can do it yourself by any convenient way. This task does not belong to SDAC tasks.
Code: Select all
MSConnection.Server := '.\SQLExpress';
MSConnection.Database := 'DatabaseName'
MSConnection.Authentication := auWindows;