Murugan.com
Murugan Andezuthu Dharmaratnam

  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  



What are the different login modes in sql server

Home   MSSQL   What are the different login modes in sql server          



1. Windows Authentication
2. SQL Authentication

You need to enable SQL Authentication or Mixed mode authentication to login using sql user name and password.

Here's an example of how to connect to server using vb .net using sql authentication mode.

Public mUserId As String
Public sUserId As String = "sa"
Public sPassWord As String = "sa123"
Public sDatabase As String = "CampusIndya"
Public sServer As String = "MURUGAN\SQLEXPRESS"

Public Sub GetConnection()
If MyConnection.State = ConnectionState.Closed Then
MyConnection.ConnectionString = "User ID=" & sUserId & ";Password=" & sPassWord & ";database=" & sDatabase & " ;server=" & sServer
End If
End Sub





  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  

Copyright 2009 @ Murugan Andezuthu Dharmaratnam