MTSkull
Well-known member
Code:
Dim adoConnection As New Connection
Dim adoRecordset As New Recordset
Dim spSource As Object
Dim strConn As String
strConn = "driver={SQL Server};server=" & gstrServer & ";database=" & gstrDB
adoConnection.Open(strConn)
adoRecordset.Open("EXEC SP_Telesales_Prof_Search " & txtProfID.Text & ", " & txtFirstName.Text & ", " & txtLastName.Text & "", adoConnection, CursorTypeEnum.adOpenStatic)
grdResult.DataSource = adoRecordset
I am trying to run a stored procedure, which will return all of the professionals located in a field based on all or part entries in three fields. I tested the stored procedure and it works fine. When I try to run the code it breaks when I try to set the data grid to the result of the record set. Not sure if this will be enough to diagnose. I tried using a previous post as an example but I have not had much luck with SQL objects so I am trying ADO instead.
Brian