.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Iterate data row to find errors.

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :ASP.Net

Hi, I have an asp website, and a dataset with a datatable. When I check I after configuring it it shows all the data. But when I run the code I got an exception

System.Data.ConstraintException was unhandled by user code
  Message="Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints."

I want to figure it out with iterating datarow.

Some codes are here but I need help to iterate datarow.

public partial class tabRegionExtremeList : System.Web.UI.Page
    DataSet1TableAdapters.droughtDataTableAdapter k1 = new DataSet1TableAdapters.droughtDataTableAdapter();
    DataSet1.droughtDataTableDataTable k2 = new DataSet1.droughtDataTableDataTable(); 
    String [][]ExtremeList;
    protected void Page_Load(object sender, EventArgs e)
    private void getRegionExtremeList()
            // How to catch error by iterating Datarow here
            // such as using 
          // foreach(...)



View Complete Post

More Related Resource Links

Toolbox: Synchronize Data, Review Runtime Errors, and More


This month we bring you products that let you synchronize data, correct runtime errors, and more.

Scott Mitchell

MSDN Magazine August 2006

System.Data.OleDb.OleDbException: Could not find installable ISAM.


Hi, i got the following error while i am trying to get my web application to run on windows server 2003. I've installed 2007 data access components on windows server 2003 but the web application does not seem to work. The codes that i use is as follows:

string strConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + address + ";Extended Properties=Excel 12.0;"; OleDbConnection objConn = new OleDbConnection(strConn); string strSQL = "SELECT * FROM [Sheet 1$]"; OleDbCommand objCmd = new OleDbCommand(strSQL, objConn);

OleDbDataReader oddReader = null;


oddReader = objCmd.ExecuteReader();







I've read a lot of forum posts and almost all of them mentioned ab out the connectionstring being wrong. However, when i ran the codes on my local machine, there were no errors. The error only show when i was running on windows server 2003.

I've underlined where the error is pointing to. Please advise. Thanks

To prevent possible data loss before loading the designer, the following errors must be resolved: In

To prevent possible data loss before loading the designer, the following errors must be resolved: The class Form can be designed, but is not the first class in the file. Visual Studio requires that designers use the first class in the file. Move the class code so that it is the first class in the file and try loading the designer again. Instances of this error (1) 1. Hide Call Stack at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager) at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager) at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager) at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host) Thanks! This post is from Matthew Cenance.

Errors in the back-end database access module. OLE DB reported an overflow of the data type for colu

Getting an error when processing a dimension, Errors in the back-end database access module. OLE DB reported an overflow of the data type for column 0. Errors in the OLAP storage engine: An error occurred while the 'xxxxxx' attribute of the 'Dim XXXXXX' dimension from the 'XXXXXXX' database was being processed. Content of this dimension is very similar to one that is processing no problem. The content of the dimension is one field only of type date.  The original content was imported through SSIS from a DB2 database on an iseries machine.  Thought a first the issue was because of the data contains some null values but the dimension the process OK also has some null  values.  The dimension that processes ok is also a single field of type date. Any help greatly appreciated, Roscoe

Data Driven Subscription problem - sub runs slowly, has 40 errors out of 300, but report server trac

I have two report servers and a single separate SQL Server 2008 server hosting the data source database and the report server catalogues. There is a data driven subscription that runs off a sproc that returns 300 rows with email addresses for this report to be emailed to. The report itself contains around 30 subreports each with its own sproc to retrieve data. As the report is executing there are long pauses between the times when emails are actually sent out, and the subscription status will finally end with something like "Done: 300 processed of 300 total; 40 errors." I am not sure how to go about troubleshooting this problem. Details: I kicked it off at (say) 2:00 PM. Within 3 minutes in the report server execution log I saw 300 entries. There were exactly 300 people who should receive reports, so the master report should have executed 300 times and sent out 300 emails. So this looked good in the execution log. But when I checked report manager's status page for the subscription it was listed as processing 50 out of 300... Then all activity stopped, about 15 minutes some more reports started emailing out, and now I see there are around 590 rows in the execution log and maybe 97 emails sent out... Then finally I get a grand total of 846 rows in the execution log and a grand total of 260 of 300 emails sent out with 40 errors so 260+40=300 exactly. The time betw

How to find a rownumber in a matrix in SSRS and use it to manipulate data

Hi, I have an MDX query which returns me a dataset. It is something like this. Country Measure 1 Measure 2 Country 1 99 100 City 1 45 50 City 2 40 30 City3 14 20 Now in the actual report I need to show the data for the City Rows using a logic like City.Measure - Country.Measure. This has to be dynamic as I dont know the number of rows in my report. I have taken a tablix and bound my cells to the appropriate measures. My problem is to write an expression for the cell such that if it is the 1st row (Country row), then it should directly take the value, else it should do a logic like City.Value- Country.Value (in ex. for City 1, Measure 1 data should be -44 ). Can someone help me in writing the expression. I checked on net and saw that we can use the RowNumber function, but I could not use it like =iif(Rownumber=1, "1st Condition", "2nd Condition"). Any help will be appreciated. Thanks, Suman

Errors in the high-level relational engine. A connection could not be made to the data source with t

When I deploy the cube which is sitting on my PC (local) the following 4 errors come up: Error 1 The datasource , 'AdventureWorksDW', contains an ImpersonationMode that that is not supported for processing operations.  0 0 Error 2 Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'Adventure Works DW', Name of 'AdventureWorksDW'.  0 0 Error 3 Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Customer', Name of 'Customer' was being processed.  0 0 Error 4 Errors in the OLAP storage engine: An error occurred while the 'Customer Alternate Key' attribute of the 'Customer' dimension from the 'Analysis Services Tutorial' database was being processed.  0 0

How to find, where is data in a db?

Hi, User send me some data from troubleshooting. I want to find where is this data stored in db.   my db is called emp_db Got 104 tables. i want to find a data in this db, which table, which column. How i find it?

Failed to find or load the registered .Net Framework Data Provider.




I am using enterprise library 5.0,vs.net 2008,oracle 9i,odp.net version.

In machine.config I added the line below in

<add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory , Oracle.DataAccess, Version=, Culture=neutral, PublicKeyToken=89b483f429c47342"/>


DbProviderFactory pf = DbProviderFactories.GetFactory("Oracle.DataAcess.Client");

above line is throwing an error.

System.Configuration.ConfigurationErrorsException was unhandled by user code

Message="Failed to find or load the registered .Net Framework Data Provider."


BareMessage="Failed to find or load the registered .Net Framework Data Provider."



at System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow)

at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)

at testweb2008.Classes.test..ctor(String strKey) in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\testweb2008\testweb2008\Classes\test.cs:line 30

at testweb2008._Default.Page_Load(Object sender

Trying to find out how data from warehouse is loaded into a dimension


(SQL Server 2005)

I have a customer data warehouse table that I am loading into a customer dimension.  Each row in the warehouse has a unique integer key.  It is possible to have multiple rows with the same customer name.  Each row will have an account code and an alternate account code.  Besides the key field, Name + Account + Alternate is what makes a row unique.

Once I process the table into the warehouse it looks like I am only getting one entry in the dimension based on customer name.  It is difficult to browse dimensions and tell exactly what is there.  I've tried setting up a plain demision and also adding  Account code and Alternate account codes as attribute relations under Name.  I've also tried a hierarchy with Name -> Account -> Alt Account.

I have a customer with 2 account codes and multiple Alternate codes - 29 rows in the warehouse.  When I browse I only get one result for name - I want to see 29 names all the same.  Do I need to set up the dimension somehow to use Name+Account+Alternate as the key?  Currently I am using the warehouse key field as the key. 



Find Scale and Precision in Float data type

Is there any way that i can find the scale and precision in float data type column. The table has around 1000 records and for each record, i need to find what is the scale and precision for the column which has float data type.

How to update a variable in Data Flow component of lookup has rows that don't find matches



I'm using SSIS 2008

I have a data flow that gets data from an Excel spreadsheet. It then does numerous lookups to my database to ensure that all the entities in the spreadsheet are present in my dimension tables. For each of these lookups, I redirect rows with "no matching entries" to be written to another spreadsheet which is then sent to an email address for action.

I have a Package scoped variable that I want to update if any of the lookups have rows with no matching entries. This is used later in the package to determine if it should proceed or not. So this variable only needs to be updated once if any of the lookups fail. 


What are the options for doing this? What is the best way?


Craig Bryden - Please mark correct answers

Find Workflow errors



I m using 3 state workflow in sharepoint on Service Request List. Some times I see workflow got errored out and all I see is Error Occurred

link which takes me workflow information.

Couldnt find error in eventvwr or any other place.

How can I find what the error is ?


Find and Set DetailsView Controls In Empty Data Template in Gridview



I would like to find controls in the detailsview control placed in the EmptyData Template of the gridview.   I am trying to create Insert new record for the gridview control.

1. If there are existing records in the table - works fine and sets my two values:
 placed Detailsview and Insert Button in the footer of the gridview.  I needed to set the values of two fields.  When I click on the Insert button it saves new record and sets the field with the value (code attached - works fine).  I also have a popup extender that opens detailsview - this works just fine.

2, If ther are not records in the table - saves record but cannot find and set controls on the detailsview
Same thing setup in the EmptyData Template.  The record is saved but I cannot Find and set the field value on the control.

Here is code:

1.  Link button (on click) in the gridview footer (works fine)

protected void LinkButton1_Click1(object sender, EventArgs e)


        string zupa1;

        zupa1 = ddlSelectEmployee.SelectedValue;





Error: Failed to find or load the registered .Net Framework Data Provider.


Oracle 10
Windows 7
IIS 7.5
Page created with VS2010
ASP.NET v4.0


When I created my website I downloaded the Oracle Database Access Component and the Oracle Tools for VS. Everything worked fine in development and running from the VS development server everything works perfect.

However when I deployed the site to IIS the site works fine until I attempt to open a page that has an oracle bound gridview in it. I then received the following error;

Failed to find or load the registered .Net Framework Data Provider.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Configuration.ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider.

[ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider.]
System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow) +2189034
System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +135
System.Web.UI.WebControls.SqlDataSource.GetDbProviderFactorySecure() +48

how to discard hole set of transaction if the we find predefined data is found in those set of reco


Hi all,

i am working on the migrating project now i want select list of records depending on the min date of transaction and balance collumn  if i fin the zero in the balance in the min date of transaction i have discard the hole set of records & i have to check the next for the same condition if i have any non zero value for min(trdate) then i shoul select top first record

i have data as below

ac_no                trdate              balance ---------------

1                     2010-3-31           0     -------

1                     2010-3-31              50         ----------

1                     2010-04-01             500     ----------

2     &

SSIS Package - Completes With No Errors BUT No Data




I've created an SSIS package that runs to completion and doesn't throw any errors.  The Data Flow task runs a SQL command on the OLE DB Source (I can view the results of this query and it looks great).  It then runs a Data Conversion step and then outputs to an Excel Destination file.  The file gets created with the headers correctly, but there is NO DATA...  I'm not sure what to try...


Any ideas?  Has this ever happened to anyone?




ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend