Subject: Divide by Zero Error [this.Adapter.Fill(dataTable)
Posted By: miamikk Post Date: 10/30/2006 3:26:36 PM
I am getting a "Divide by Zero Error Encountered" when I run my ASP.NET application. The error looks like is encountered when filling DataSet.
I have a GridView on frontpage that is configured to get data from a Dataset which uses Stored Procedure to get data. The SP runs perfectly when I run in SQL Server but I don't know why is it throwing an error when I run from ASP.NET.

Any help is really appreciated.

I am attaching some images below to give more information:

Image of Default.aspx page and DataSet
http://www.fiu.edu/~atmakurk/ustrade/Default_DataSet.jpg

Image of Error
http://www.fiu.edu/~atmakurk/ustrade/Error.jpg

Image of Stored Procedure Code
http://www.fiu.edu/~atmakurk/ustrade/SP.jpg

Image of Output when Stored Procedure is executed in SQL Server
http://www.fiu.edu/~atmakurk/ustrade/SP_RUN.jpg

(I have noticed that when stored procedure is executed in SQL server, it returns a Value '0' in a second table. I am don't know why is "DECLARE @return_value int" and "SELECT 'Return Value' = @return_value" are created in the Stored Procedure when I created SP.




Go to topic 51625

Return to index page 135
Return to index page 134
Return to index page 133
Return to index page 132
Return to index page 131
Return to index page 130
Return to index page 129
Return to index page 128
Return to index page 127
Return to index page 126