hai shekhar2012,
1.create a connection string as
Private con As New SqlConnection("Password=******;User ID=username;Data Source=databasename;Persist Security Info=True")
2.create a sql command
Private cmd As sqlCommand
cmd = New sqlcommand(sqlQry, con)
If con.State = ConnectionState.Closed Then
con.Open()
End If