J
Jeff Thur
I am getting this error when trying to run a stored
procedure:
[MissingMemberException: No default member found for
type 'DataSet'.]
Microsoft.VisualBasic.CompilerServices.LateBinding.LateInd
exGet(Object o, Object[] args, String[] paramnames) +1361
ASP.Baldwin41_aspx.Button1_Click(Object sender,
EventArgs e) +66
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
+83
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEv
entHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent
(IPostBackEventHandler sourceControl, String
eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent
(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
Here is my program
Function GetResults
Dim ConnString As String = "server='(local)'; user
id='sa'; password='fritz'; database='Cutis'"
Dim sproc As String = "EMSTONY"
Dim paramsize As Integer = (7)
Dim Conn As New SqlConnection(ConnString)
Dim cmd As New SqlCommand(sproc)
cmd.CommandType = CommandType.StoredProcedure
Dim param as New SqlParameter("@txtSort", DbType.String,
paramSize)
param.Value = txtSort.Text
cmd.Parameters.Add(param)
Dim da As New SqlDataAdapter(cmd)
Dim ds As New DataSet("Dataset")
da.TableMappings.Add("Table", "DataGrid1")
Try
conn.Open()
da.Fill(ds)
Catch ex As Exception
'Error handling here
Finally
If (conn.State = ConnectionState.Open) Then
conn.Close()
End If
conn.Dispose()
End Try
Return (ds)
End Function
Sub Button1_Click(sender As Object, e As EventArgs)
DataGrid1.DataSource = GetResults(TxtSort)
DataGrid1.DataBind()
End Sub
Any HELP GREATLY APPRECIATED.
procedure:
[MissingMemberException: No default member found for
type 'DataSet'.]
Microsoft.VisualBasic.CompilerServices.LateBinding.LateInd
exGet(Object o, Object[] args, String[] paramnames) +1361
ASP.Baldwin41_aspx.Button1_Click(Object sender,
EventArgs e) +66
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
+83
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEv
entHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent
(IPostBackEventHandler sourceControl, String
eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent
(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
Here is my program
Function GetResults
Dim ConnString As String = "server='(local)'; user
id='sa'; password='fritz'; database='Cutis'"
Dim sproc As String = "EMSTONY"
Dim paramsize As Integer = (7)
Dim Conn As New SqlConnection(ConnString)
Dim cmd As New SqlCommand(sproc)
cmd.CommandType = CommandType.StoredProcedure
Dim param as New SqlParameter("@txtSort", DbType.String,
paramSize)
param.Value = txtSort.Text
cmd.Parameters.Add(param)
Dim da As New SqlDataAdapter(cmd)
Dim ds As New DataSet("Dataset")
da.TableMappings.Add("Table", "DataGrid1")
Try
conn.Open()
da.Fill(ds)
Catch ex As Exception
'Error handling here
Finally
If (conn.State = ConnectionState.Open) Then
conn.Close()
End If
conn.Dispose()
End Try
Return (ds)
End Function
Sub Button1_Click(sender As Object, e As EventArgs)
DataGrid1.DataSource = GetResults(TxtSort)
DataGrid1.DataBind()
End Sub
Any HELP GREATLY APPRECIATED.