I have the following code attached to the click event of a button. It fails
on the line "da.Fill (ds, "Results") The error is below the code. Any
suggestions would be greatly appreciated. Thanks.
Dim cmd As SqlCommand = SqlConnection1.CreateCommand
cmd.CommandType = CommandType.Text
cmd.CommandText = txtQuery.Text
Dim da As SqlDataAdapter = New SqlDataAdapter
da.SelectCommand = cmd
Dim ds As DataSet = New DataSet
da.Fill(ds, "Results")
dgResults.DataSource = ds
dgResults.DataMember = "Results"
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred
in system.data.dll
Additional information: System error.

Signature
Joe Micheli CPA, CMA, CFM, CPIM
FPM - 16 Aug 2005 20:46 GMT
hi joseph,
I think that the first thing you should do is to enclose your
'da.Fill(ds,"Results")'-statement in a try-catch-block. In that way you can
catch the exception and examine it more closely. The exception should give
more insight on what is causing the error.
Frank.
> I have the following code attached to the click event of a button. It fails
> on the line "da.Fill (ds, "Results") The error is below the code. Any
[quoted text clipped - 14 lines]
>
> Additional information: System error.