Wednesday, March 28, 2012

How to connect via ODBC

Hi,

I would like to connect in SqlServer 2005 via ODBC SQLServer, how are the steps?

1 - How can I connect ODBC?

1.1 - I need SqlServer 2005 name - ok

1.2 - Which option should I take in order to login? Windows NT authentication or Sql Server authentication?

Which one is the best option?

Cheers,

Alessandro

1.2 - Which option should I take in order to login? Windows NT authentication or Sql Server authentication?

That depends - Windows authentication is almost always better but if you cannot use it then SQL Server authentication is fine as long as you have it enabled on the server and you have created a login on the server. With Windows authentication you can easily use existing Windows domains, groups and users, you don't have to create everything on the server and use extra login names and passwords.

What type of application are you using to connect to SQL Server? ODBC should be your last choice, rather use OLE DB or the .NET data provider if you can.

|||

Hi,

- I picked windows authentication. I can not use OLE DB from my application.

I've created one windows user and created one login, but I still getting "Not associated with a trusted SQL Server connection". I changed Surface Area configuration and Configuration Manager as well. I heard that I nedd to enable mix mode option, how can I do this?

thanks

|||

You haven't told me anything about your application or why you can't use OLE DB, so I'm guessing - but it sounds like you cannot use Windows authentication. In SQL Server Management Studio, right click your server and select Properties. Select the Security page, and on that page select the SQL Server and Windows Authentication mode radio button.

Then add a SQL Server login, and use that login and password in your connection string.

No comments:

Post a Comment