Home All Groups Group Topic Archive Search About

System Error when executing a data adapter object in 1.1

Author
26 Jan 2006 6:31 PM
Gerhard
Running VS 2003 on 1.1 framework.
Every time my code trys to execute the line ' da.Fill(dt)', I get following
exception:

~~~~~~~~~~~~~~~~~~
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred
in system.data.dll
Additional information: System error.
~~~~~~~~~~~~~~~~~~

Here is my code:
~~~~~~~~~~~~~~~~~~
Dim dt As New System.Data.DataTable
        Dim da As SqlClient.SqlDataAdapter

        Dim cmd As New SqlClient.SqlCommand
        cmd.CommandText = strQuery
        cmd.Connection = _docConn

        _docConn.Open()
            da = New SqlClient.SqlDataAdapter(cmd)
            da.Fill(dt)
        _docConn.Close()
~~~~~~~~~~~~~~~~~~

Any ideas?
I appreciate anyones help on this.
Thanks Gerhard

Author
26 Jan 2006 6:54 PM
Naveen
The sql exception class has lot more properties to give you more
details as to why it is failing. Example the procedure property gives
info gets the name of the stored procedure or remote procedure call
(RPC) that generated the error. I guess if you look in to the exception
object you would be able to figure out the problem.

AddThis Social Bookmark Button