Larry Brister
asked on
Link as Grid Datasource
Is there any advantages in using LINQ to call a stored procedure in my vb code?
My attached code below works fine...just wondering.
My attached code below works fine...just wondering.
Dim objConn1 As SqlConnection
objConn1 = New SqlConnection(System.Configuration.ConfigurationManager.AppSettings("ConnPortal"))
Dim oCom1 As SqlCommand
oCom1 = New SqlCommand
oCom1.Connection = objConn1
oCom1.CommandText = "sp_crmSS_leadListGet"
oCom1.CommandType = CommandType.StoredProcedure
oCom1.Parameters.Add(New SqlParameter("@searchName", SqlDbType.NVarChar, 50)).Value = Session("SearchName").ToString
Dim dA As SqlDataAdapter = New SqlDataAdapter(oCom1)
dT = New DataTable
objConn1.Open()
Try
dA.Fill(dT)
Finally
objConn1.Close()
End Try
objConn1.Dispose()
oCom1.Dispose()
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER