The syntax of the connection string varies with the data source and with the data provider. Even with the same data source but with a different data provider, the syntax changes. For example, to connect to a SQL Server database in .NET, you can use the SQL Server .NET data provider (the preferred method with the best performance) but you can also use the OLE DB .NET data provider or even through the ODBC .NET data provider. Each has differences. The easiest thing to do is to stick with the syntax that I gave you to connect using SQL Server authentication. This will use the SQL Server .NET data provider and give you the fastest connection with the least amount of overhead.
As for Enterprise Manager, it does not ask you for your username and password because the connection to you database in Enterprise Manager has saved that information (right-click on the name of your server in Enterprise Manager and select Edit SQL Server Registration Properties to see this).
To see if you have mixed mode security, right click on the name of your server in Enterprise Manager and select Properties. Then select the security tab and look at the Authentication setting. You want SQL Server and Windows selected.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only