Dim myConnection As String = "UID=USERNAME;PWD=password;DATABASE=dbname;WSID=COMPUTER-7A8D3E;APP=Microsoft Data Access Components;SERVER=COMPUTER-7A8D3E"
Private myDBConn As SqlClient.SqlConnection
myDBConn = New SqlClient.SqlConnection(myConnection)
'Open a connection
myDBConn.Open()
Dim _dt As New DataTable
'Create a command to a stored procedure and add parameters
Dim _cmdInfo As New SqlClient.SqlCommand(StoredProcedureName, myDBConn)
With _cmdInfo
.Parameters.Add(Parameter)
.CommandType = CommandType.StoredProcedure
End With
'Create the dataadapter using our command
Dim _da As New SqlClient.SqlDataAdapter(_cmdStuInfo)
_da.SelectCommand = _cmdStuInfo
'Fill a table
_da.Fill(_dt)
myDBConn.Close()
dha03117761 said:Hi I'd like to knoiw to create the DSN and what is it. Can I connect to the Database without using DSN