Skip to main content


Showing posts from June, 2009

DataRowStates of DataSet

Programmers always look for shortcuts and ease while he perform his job. Microsoft provides a number of Services in this Regard. VisualStudio.NET is one of the remarkable development of Microsoft. (Enough to talk about Microsoft)

Here, I want to tell you that how can we get only that data from DataSet which we manipulate while we were performing our job.

DataSet has a number of DataRowState Properties:

1) DataRowState.Added
2) DataRowState.Deleted
3) DataRowState.Modified
4) DataRowState.Detached
5) DataRowState.Unchanged

DataRowState help us in getting the manipulated data which we either Change, Delete or Add.

Now, How can we use these state. I am telling you below but first we have to fill a dataset by any values. For Example, I create my own database. Insert values in it and after then I call them through query into dataset.

Here, I assume that you must have fill your dataset already. Now change a value of any row from your dataset. To get confirmation that something is changed you can…


Dear Friends, When I was new to Crystal Report in Visual Studio. The very first problem that I was encoutered was how to pass parameters to Crystal Report from And I was amazed when I found the solution quite easy.


You must first make an instance of the report object

dim rpt as new reportname

now you can pass the parameter to report


For Example


I hope this will help you alot.

Invalid Report File Path

Dear Friends, Last days I was very upset due to a minute problem which make my life hell, and when I discover its solutions I was amazed that how much easy it was to resolve.

I create a report in Visual Studio 2003 in The report display its results but when I give it command to print the document or to export the document then it shows me an error which says

"Invalid Report File Path"

I google on web alot and found a huge number of solutions too but neither work for me.

The solution was quite simple. I have written all the queries and codes in FormName_Activated() Method. I just cut the code from there and paste it to FormName_Load() Method.

And get the result which I want.

It now not only export the report but also print the report too.

Ohh..... GOD some times a minor problem becomes a huge one and have a very minute solution but only the problem is to discover it..............

I hope this will help you as well.

Wish you all the best......................


Some times we have a situation where we dispose the reference instance and then later on we try to use it and it gives us an exception

"Cannot access a disposed object".

The simple solution of the above problem is that you first check that either the instance of the reference is not disposed. If it is disposed then create a new instance of the reference and to check that either the instance of the reference is alive or not, we simple write the following code

if frm.IsDisposed()=true then
frm=new form1
end if

That's all....

Enjoy the world of Programming.