Unable to retrieve schema - Divide by zero error encountered

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi

Has anybody ever come across this error when working with a DataView on
ASP.NET 2.0?

Here's the funny thing - the grid works fine. However, if I try to edit
columns, I don't have the list of all the available columns in the data
source. If I try to refresh the schema, either in the edit columns mode or
via that sqldatasource directly, I get the abovementioned error - the full
text is

Unable to retrieve schema. Ensure that the ConnectionString and
SelectCommand properties are valid.

Divide by zero error encountered.

However, if I configure the datasource, and go through the usual steps, when
I get to the point where I can test the data source, I do get the expected
results back - thus further underlining that there's nothing wrong with the
underlying connection or select command.

I even set a breakpoint in the selecting event of the sqldatasource to
ensure that the parameters sent to my stored procedure (the data source
calls a stored procedure with two arguments) are correct.

While there's a numeric division in the stored procedure, there are
precautions in the code preventing any possible division by zero, and sine
even Visual Studio manages to get the data in the data source configuration
mode, there's nothing wrong with the data that is being returned, leaving me
with the question what the heck is going on here.

Any insight you might have would be greatly appreciated. In the meantime
I've gone over to configuring the grid manually which seems to work just
fine (I have yet to see any data in the running app though.. )

Regards
Stephan


.



Relevant Pages

  • RE: Problem using GLobal Variables in DTS Package
    ... > I have created a DTS package, the data source is a stored procedure with an ... > The source connection for the transformation uses Microsoft OLE DB Provider ...
    (microsoft.public.sqlserver.dts)
  • RE: How to Refresh Datagrid Control?
    ... Normaly you would fill a grid like this: ... Would you suggest the code that I need to use to "refresh" the dataset? ... created from the New Data Source wizard. ... is needed to requery the sql database? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: DataGrid [Attribute] - $10 for answer
    ... > descriptor information which the grid will pick up and use to display it's ... > the data grid column styles first, and then bind your data source to the ... trivial to have originally implemented the DataGrid in such a way as to query ... >> public string FirstName ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Returning records from a Store Procedure
    ... It is being assigned to a datareader. ... Runs decently when the Stored procedure returns a small data set. ... That takes 10 minutes to finish loading. ... > object to get data out of a database, but if you're loading it to a grid it ...
    (microsoft.public.data.ado)
  • Problem using GLobal Variables in DTS Package
    ... I use SQL 2K on a Win2K box ... I have created a DTS package, the data source is a stored procedure with an ...
    (microsoft.public.sqlserver.dts)