473,386 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Page Cannot Be Found - DNS Error

Ive searched and searched but can't find anyone with a similar problem
to mine. Ive made a web form that just enables you to choose a period
in DateTime, and filter by certain categories once the sql data has
been returned. it all works fine until I request a month or more of
data (30000 records). The page updates, returning the info in a
scrollable datagrid, but then i cant click anything, not even buttons
that dont request any info. one button only togggles some text
visible/hidden and that even causes the DNS error.
ive had plenty of experience with visual studio and c++ etc, but ive
never done any web publishing like this so I'm stuck.
i was thinking maybe there is a way to store all the data from the
first request in memory and then have the buttons/drop down lists only
effect that info, so the server is only contacted every time the period
is changed. is this possible?
any other ideas?
thanks
_________
James

Jan 31 '06 #1
5 1075
I would try 1 of 2 things.

1. Use a IDataReader. As opposed to NOT using a DataSet. IDataReaders are
"fire hose" , in that you read 1 record at a time, then you move to the next
one.

2. If your page has any sort of "re-accessing" the data, to filter, sort,
etc. then Create a MyObjectCollection : CollectionBase (implements
CollectionBase)

and use an IDataReader to populate

Where you create another object called

public class MyObject

private string m_name;

public string Name

{ get { return this.m_name; }}

public MyObject (string n)

{ this.m_name = n; }

you will get an IDataReader

as you loop over the IDataReader, you will create a new MyObject, and then
add it to MyObjectCollection

You'll have to do a little more research on using IDataReader and
CollectionBase, but the overhead of this is smaller than using a DataSet.

...

"jimmyrose" <j4*****@student.qut.edu.au> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Ive searched and searched but can't find anyone with a similar problem
to mine. Ive made a web form that just enables you to choose a period
in DateTime, and filter by certain categories once the sql data has
been returned. it all works fine until I request a month or more of
data (30000 records). The page updates, returning the info in a
scrollable datagrid, but then i cant click anything, not even buttons
that dont request any info. one button only togggles some text
visible/hidden and that even causes the DNS error.
ive had plenty of experience with visual studio and c++ etc, but ive
never done any web publishing like this so I'm stuck.
i was thinking maybe there is a way to store all the data from the
first request in memory and then have the buttons/drop down lists only
effect that info, so the server is only contacted every time the period
is changed. is this possible?
any other ideas?
thanks
_________
James

Feb 1 '06 #2
Thanks,
Ok i researched the IDataReader and CollectionBase and I think I know
how to implement them, but I don't know how to filter the
collectionbase once i have all the data in there. do i have to make
another collection called DisplayCollection and look at all the records
in the original one to pick out the ones i want based on a filter
string? or is this built in somehow. is there any way i could just
query the collection? that would make things much simpler.

Feb 1 '06 #3
your problem is your page html is too big. for IE to render 30,000 table
rows is a long time. you are trying to post before all the html has
rendered.

you should switch to a paging table/grid, (also carefully control the
viewstate usage of a grid). you can use session to store a dataset of the
query, and rebind to it. or write a paging query where only the page is
loaded into the dataset.
-- bruce (sqlwork.com)

"jimmyrose" <j4*****@student.qut.edu.au> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Ive searched and searched but can't find anyone with a similar problem
to mine. Ive made a web form that just enables you to choose a period
in DateTime, and filter by certain categories once the sql data has
been returned. it all works fine until I request a month or more of
data (30000 records). The page updates, returning the info in a
scrollable datagrid, but then i cant click anything, not even buttons
that dont request any info. one button only togggles some text
visible/hidden and that even causes the DNS error.
ive had plenty of experience with visual studio and c++ etc, but ive
never done any web publishing like this so I'm stuck.
i was thinking maybe there is a way to store all the data from the
first request in memory and then have the buttons/drop down lists only
effect that info, so the server is only contacted every time the period
is changed. is this possible?
any other ideas?
thanks
_________
James

Feb 1 '06 #4

Ok..

You're almost there:

now, your CollectionBase (your implementation), will need to add a .Sort
method.

the .Sort method takes an IComparer object. You create your own IComparer.

Here is a sample. Assuming you already have an object called Employee, with
2 properties
public int Age
public string Name
namespace MyApplication.BusinessLogicTier

public class EmployeeComparer : IComparer
{
private EmployeeComparerSortColumns m_sortValue;

public enum EmployeeComparerSortColumns
{
None = 0 , Age = 1 , Name = 2
}

public EmployeeComparer(EmployeeComparerSortColumns sortValue)
{
m_sortValue = sortValue;
}

public int Compare(object x,object y)
{
switch(m_sortValue)
{
case EmployeeComparerSortColumns.Name :
case EmployeeComparerSortColumns.None :
return
((MyApplication.BusinessLogicTierEmployee)x).Name. CompareTo(((MyApplication.BusinessLogicTierEmploye e
)y).Name );
//break;

case EmployeeComparerSortColumns.Age :
return
((MyApplication.BusinessLogicTierEmployee)y).Age.C ompareTo(((MyApplication.BusinessLogicTierEmployee )x).Age
);
// break;

default:
return
((MyApplication.BusinessLogicTierEmployee)x).Name. CompareTo(((MyApplication.BusinessLogicTierEmploye e)y).Name
);
// break;
}
}
}

}
Ok, your CollectionBase object will have a .Sort method.

MyCollection.Sort (IComparer ic) // it may be "override", I'm going from
memory.
{
this.innerList.Sort(ic);
}
Notice you call the base class' Sort method.
Then you do something like
MyCollection my = new MyCollection();
my.Add ( new Employee() );
my.Add (new Employee() );
EmployeeComparer ec = new EmployeeComparer
(EmployeeComparer.EmployeeComparerSortColumns.Age) ;
my.Sort(ec);
I think those are the pieces.
The way I wrote the EmployeeComparer , means you don't have to write a
different one for each property, because you have an enum in the
constructor. A tad bit cleaner.
...
I am suggesting this route for 2 reasons:

Less overhead than the DataSet. Everybody likes to use/suggest datasets,
because they're quick. However, there isn't magic fairly dust, because they
do so much, they have alot of overhead with them.
Using the IDataReader ... and putting that into a CollectionBase, is alot
less overhead. (It may not seem that way, but populating a custom
CollectionBase is about 30% faster in my personal tests).

#2, you can cache a true CollectionBase (filled with MyObject's) alot better
than a DataSet.

Because of your large number of records, OVERHEAD is your biggest enemy.
I'm not even saying this way will definately work. I'm saying it has a lot
better chance that a DataSet.

After you get working, then you may want to add the
[Serializable]
attribute to your MyObject definition, and your MyCollection objects.

(it looks like this in C#
namespace MyApp
{
[Serializable]
public class MyObject
{
}
}

What you're doing here is more work, but you pay the price for less
overhead.
...
PS

You should also keep your ( IDataReader to MyCollection ) converter code
generic, in its own routine. Thus you can re use it.

Something like:
public MyCollection TransformTheIDataReaderToMyCollection (IDataReader idr)
{

MyCollection returnColl = new MyCollection();

while (idr.Read()) // my syntax might be a little off here, I'm going from
memory.
{
MyObject o =new MyObject();
if( !idr.IsDBNull( 0 ) )
{
o.Age = idr.GetInt32(0);
}
if( !idr.IsDBNull( 1 ) )
o.Name = idr.GetString(1);
}

returnColl.Add ( o );

}
return returnColl;

}

This way.... you can populate your IDataReader with
All Records (no filter)
Some records ( filters applied , like "Age = 34" in your Select query)
1 record ( Where Emp.EmpId = 12345 )

...

Ok.... I think that should help.
You're writing some more advanced code than just populating a DataSet.

As you become more famaliar with CollectionBase , it may turn into your
bread and butter for object storing.
Especially with the generic TransformTheIDataReaderToMyCollection method.

One last thing:

Where I have:

if( !idr.IsDBNull( 0 ) )
{
o.Age = idr.GetInt32(0);
}

You probably want to put in a CONST or some kind of enum or structure for
"0", to make the code more readable.

private readonly int CONST_AGE_COLUMN_ORDINAL_POS = 0;

if( !idr.IsDBNull( CONST_AGE_COLUMN_ORDINAL_POS ) )
{
o.Age = idr.GetInt32(CONST_AGE_COLUMN_ORDINAL_POS ) ;
}

You check out some other hints at my blog at:
http://spaces.msn.com/sholliday/

As the other guy suggest, implementing Paging ( Page1 , Page2 ,..... PageN)
might be something to look at.
While he suggests caching the DataSet object, I would still promote the
MyCollection idea.

If you want to find a cool web caching mechanism, check out my 10/24/2005
entry on my blog.

...
"jimmyrose" <j4*****@student.qut.edu.au> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
Thanks,
Ok i researched the IDataReader and CollectionBase and I think I know
how to implement them, but I don't know how to filter the
collectionbase once i have all the data in there. do i have to make
another collection called DisplayCollection and look at all the records
in the original one to pick out the ones i want based on a filter
string? or is this built in somehow. is there any way i could just
query the collection? that would make things much simpler.

Feb 1 '06 #5
wow thanks. all that was a bit hard to take in, but i might give it a
go, except that it will probably take too long to implement. this page
wasnt meant to be something really advanced, just a quick way to filter
through site-wide alarms. i was thinking last night i could simply just
do a count before the query, and see if theres more than 5000 records
show a label saying "Not all data displayed - narrow the search" and do
a TOP 5000 query. i dont think anyone is going to want to scroll
through 30000+ rows of data, they can just use the damn filters, thats
what theyre there for.
but thanks for your help!

Feb 1 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Paul | last post by:
I thought this is more of an IE issue but i've had no joy on that group perhaps somebody here will have a clue. If i click a link to a web page embedded in Excel (97 OR 2000) i get the standard...
13
by: teenzbutler | last post by:
I have a 10mb ASP file, which will not load in IE 6.0. I get an HTTP 500 error. When I convert the 10mb file to HTML, it loads fine. Is there a limitation on file size? If so, is there a tag I...
1
by: Greg Burns | last post by:
I am trying to write a global custom error page. I thought I would jot down some of what I've learned so far... At first I just used the default customErrors section with a defaultRedirect tag,...
2
by: ypul | last post by:
on my local server i am getting ".net error" of "page not found " but on my hosting server I am not getting .net error ...I am getting the normal page not found error what could be the reason ?...
2
by: Chris Fink | last post by:
I encountered a very odd error this afternoon. A website that has been in production for quite some time suddenly came up with a page cannot be found on the main index.aspx page for the site. 5...
9
by: Martin Eyles | last post by:
Hi, I have set up an asp.net website on another PC in order to test it. The site was fine on my PC, but on the new PC all the pages give the error "The Page Cannot Be Found". Some legacy pages...
5
by: Neil Rossi | last post by:
I have an issue with a particular ASP page on two web servers. Let's call these servers Dev1 and Beta1. Both Servers are running IIS 5, Windows 2000 SP4 with "almost" all of the latest patches. ...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
0
by: =?Utf-8?B?bmVlcmFqYkBub2lkYS5ub3NwYW1oY2x0ZWNoLmNv | last post by:
Hi, We have created new .NET web service and running it through the default test page and it's working fine in our development environment. When we moved the web service to the acceptance...
18
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.