I am trying to write my first data processing extension. The project
is based upon the Event Log example in chapter 13 of Hitchhiker's
Guide to SQL Server 2000 Reporting Services. The assembly has been
copied to the various directories and the various config files have
been modified.
The extension is used in a report project and a shared datasource is
created using the extension. When a report's dataset is created the
Fields window in the IDE is not populated. When the command is run in
the data window of the designer a null pointer error occurs. In the
preview window the error indicates the connection is not valid. This
project is written in C# and the supplied sample is written in VB.NET.
The same error occurs using the VB assemblies.
The "connection not valid" exception is generated from command class'
ExecuteReader method. The connection member is found to be null w/in
the method. In the overloaded c'tor where the connection argument is
assigned to the connection member, the argument is not null and the
member is not null after it has been assigned to. I am baffled as to
what/why/how this occuring. Suggestion?
Equally or more important how does one setup a data processing
extension project for debugging?
thank you
A.G.All issues resolved. Using System.Diagnostics.Debugger.Break I was
able to access the CLR debugger and see what was wrong. First problem
was a typo in a string. Then an indexing error was found and then the
extension 'worked' returning just a single record.
A closer examination of the datareader's Read method revealed a number
of issues involving the iteration of the event log. Changing the
method so it read one record at a time made everything work as
expected. In the sample code the entire event log is iterated when the
Read method is invoked.
Fortunately the exercise in frustration was offset by the learning and
understanding experience.
regards
A.G.
On Tue, 13 Dec 2005 18:37:43 -0500, Registered User
<n4jvp@.ix.netcom.com> wrote:
>I am trying to write my first data processing extension. The project
>is based upon the Event Log example in chapter 13 of Hitchhiker's
>Guide to SQL Server 2000 Reporting Services. The assembly has been
>copied to the various directories and the various config files have
>been modified.
>The extension is used in a report project and a shared datasource is
>created using the extension. When a report's dataset is created the
>Fields window in the IDE is not populated. When the command is run in
>the data window of the designer a null pointer error occurs. In the
>preview window the error indicates the connection is not valid. This
>project is written in C# and the supplied sample is written in VB.NET.
>The same error occurs using the VB assemblies.
>The "connection not valid" exception is generated from command class'
>ExecuteReader method. The connection member is found to be null w/in
>the method. In the overloaded c'tor where the connection argument is
>assigned to the connection member, the argument is not null and the
>member is not null after it has been assigned to. I am baffled as to
>what/why/how this occuring. Suggestion?
>Equally or more important how does one setup a data processing
>extension project for debugging?
>thank you
>A.G.
没有评论:
发表评论