Pull Everything From Db And Then Compute Stats?
Aug 5, 2010
I am working on an auto trade website. On the page where Ad list gets displayed, I plan to display the number of Ad for different categories: for example, for location: I will display something like "Vancouver (50), Richmond (12), Surrey (20)". For vehicle make, the following will be shown "Honda (20), Ford(12), VW (24)".
I am not sure if I should pull ALL the ad from the db into a List first, bind one page of the result to gridview control, and then compute stats for each category using Linq. if course I will limit the number of rows pulled from the db using some kind of condition - maybe set the MAX # of rows to be returned as 500.
My major concern is - is this going to be a memory hog?
View 1 Replies
Similar Messages:
Dec 4, 2010
I have deployed my website/app on GoDaddy hosting and am getting this Internal server error message only when trying to view the /stats folderI have forms authentication on, and when I try and visit this folder I get redirected to my CMS login page which is really strange. When I disable authentication I then get this internal server error.Anyone ever experience something like this? GoDaddy support don't and never seem to a have a clue about anything.
View 1 Replies
Jan 12, 2010
I have a problem with my asp.net program. I am doing a Datatable.compute on a very large database with a like condition in it. The result takes something like 4 minutes to show or does a Request timeout. If I do the same request with a = and a fix text, it takes nearly 1 minute to show, which for my use is acceptable.
Here is the line that is so slow:
float test = (int)Datatbl.Tables["test"].Compute("COUNT(pn)", "pn like '9800%' and mois=" + i + " and annee=" + j);
View 2 Replies
Apr 13, 2010
I have a repeater that display a customer's bill. Now, the customer has the option to select which of the account he/she will pay. Therefore, in my interface, I have a checkbox in my repeater. All I wanted is to compute for the total amount to pay based on the selected checkboxes. Below is my code for my repeater under ItemTemplate.
Code:
<ItemTemplate>
<tr>
<td style="border: 1px solid #000;">
<asp:CheckBox ID="chkEntryCode" Text='<%# DataBinder.Eval(Container.DataItem, "Code") %>' runat="server" />
</td>
<td style="border: 1px solid #000;">
<asp:Label ID="lblRequestID" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "requestid") %>'></asp:Label>
</td>
<td style="border: 1px solid #000;"><%# DataBinder.Eval(Container.DataItem, "Description") %></td>
<td style="border: 1px solid #000;">
<asp:Label ID="lblAmount" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Amount") %>'></asp:Label>
</td>
</tr>
</ItemTemplate>
And for me to compute for the amount to pay based on the checked checkboxes. I have the following code.
Code:
protected void rBill_ItemCommand(object source, RepeaterCommandEventArgs e)
{
double dAmountToPay = 0;
for (int i = 0; i <= rBill.Items.Count - 1; i++)
{
CheckBox chkItem = (CheckBox)rBill.Items[i].FindControl("chkEntryCode");
Label lblAmount = (Label)rBill.Items[i].FindControl("lblAmount");
if (chkItem.Checked)
dAmountToPay = dAmountToPay + double.Parse(lblAmount.Text);
}
lblTotalAmount.Text = dAmountToPay.ToString();
}
Well, based from the code I provided, there's nothing happens at all.
View 4 Replies
Jan 10, 2011
I am doing some aggregates on in memory tables using the DataTable.Compute method. It works file if there is only one filter, however when there is multiples then it does not work.
This first one works fine the second one does not.
[Code]....
View 4 Replies
Mar 17, 2011
I have a question, I have a Gridview with the field Description, quantity, Price per Unit, How can I compute (Quantity)*(Price per Unit ) = () on the gridview?
View 4 Replies
Mar 31, 2011
I have a webservice which retrieves data from another external service. The data is already in JSON Format. So I retrieve it and set it to the return value (type: string) of my webservice. But according to firebug the webservice then encapsulates the provided JSON-Data with a backslash, e.g. it returns:
[Code]....
instead of
[Code]....
But the JSON provided by the external service is correct. So how could I provide the correct string to jTemplate from my Webservice?
View 4 Replies
Feb 28, 2011
I am having an requirement of displaying the records in the following way in the gridview.
Division
Region
Amount
North
Region1
123
North
Region2
124
North
Total
247
South
Region1
123.......
View 3 Replies
Feb 1, 2011
i have a column named POINT.. it is the point in every question... therefore i want to get the total of this column..
View 3 Replies
Oct 18, 2010
Here's what I am trying to do:
Inside Form View Want to display the average of a field based from field1/field2
ie:)
Field 1 = 10
Field 2 = 5
Field 3 would equal 2 (Field 1 / Field 2)
How would I go abaout doing this. Code currently looks like:
[Code]....
Using custom bind expression in the formview but it won't let me do this..
View 4 Replies
Feb 24, 2010
i have a table that hold players statistics, this table going to be the biggest table of my DB, it will contain millions of records, i will frequently have to pull records (usually sum them up) from that table, what will be the best way to go, should i use SP to pull the records or should i pull all the records i need individually and sum it as i wish using the LINQ technology?
View 8 Replies
Jul 25, 2010
ok need advice in how to pull data onto an aspx page from this site
[URL]
from this file [URL]
How can I link to this..in asp.net 2.0
My wishes
1) link to this data in may aspx page so that it refresh when ever some one loads the page ( yes I will cache the page for say 300 seconds)
2) then read the aspx page this data is on and save each item to a SQL table. So keep that in mind when thinking of (1)
View 1 Replies
Feb 1, 2011
Lets say I have a variable 'userid', I want to select from aspnet_Membership AND aspnet_AccountProfile tables. They both have the column userid, I just want to be able to make a statement like SELECT * FROM aspnet_AccountProfile, aspnet_Membership WHERE UserId=@UserId and it gets the records with the matching user id for BOTH tables. how do I do this?
View 5 Replies
Apr 5, 2010
I have a ASP.NET Web Forms application and I'm using some dynamic controls in the view which depend on stuff that the presenter exposes. Is it okay for the view in this case to pull on the presenter for that data? Is there anything I should be extra careful about when considering testability and a loosely coupled design.
The page in this case has it's own page-life cycle and the presenter doesn't know about this. However, the page-life cycle dictates that somethings must occur at specific moments in the page-life cycle. This smells like trouble... Any known pit falls?
EDIT
When my concrete view hits the Init event it will pull on the presenter for a collection that will result in a bunch of ASP.NET server controls to be created. I'm wondering if this is a particular bad thing to do... The presenter doesn't know how to respond to the page-life cycle init event but it has to if the view is to be populated with dynamic controls.
View 2 Replies
Mar 21, 2011
I want the user to click the link then the window pops up, but I want the data inside the window to be pulled from a database, and I need to repeat this process for 5 links that are also pulled out of a database. Say the most popular items for the month. My question is how would this be best accomplished? Jquery, or AJAX. I am just trying to see which would be the easier way to go about coding this with .net and C#.
View 1 Replies
May 27, 2010
I have a recruitment portal that people can use to advertise and search for jobs.I would like the recruiters to be able to add a small javascript snippet to their personal websites, that will list jobs on my site. how can i go about this?I have webservices set up so the javascript can just call that, but i also need the result to be formatted and placed inline.This should work in a simular way to google adsense.
View 1 Replies
Aug 30, 2010
What i want to do is read from a database where the catalog = 12 and then have a button on the page to add a new catalog named 13 so it takes the 12 and adds 1 to it so everytime they click the button they will get a message saying "are you sure you want to create anoter catalog?" and if yes then it executes.
View 5 Replies
Sep 10, 2010
Which is the best platform to create a gadget that pulls data from a database.
View 8 Replies
Apr 23, 2010
how to pull a RANDOM item from the database when using LINQ. There seems to be a couple of differnet ways to handle this. What I need to do though is pull a RANDOM item from the database that the user has not seen before.
The data I am pulling from the database is very small. Is there any way I can just hit the database once for 1000 records and then randomly scroll through those?
Should I put a cookie on the users system recording the IDs of which items they have seen, pull a random record, check to see if it is seen and if so, pull from the database again? That seems like performance issues just waiting to happen.
View 1 Replies
Jan 26, 2011
How i can pull data from excel sheet into my webpage
i have an excel sheet on which some data is there. i want to display my data into my webpage how i do this
View 3 Replies
Jul 13, 2010
I am trying to pull data from my populated javascript table. How do I pull the value from a javascript row? I am using
for (var i = 0; i < rowCount; i++) {
var row = table.rows[i];
//This is where I am having trouble
var chkboxIndicator = row.cells[0].childNodes[1];
alert(chkboxIndicator);
//
if (chkboxIndicator == indicator && Checkbox.checked == false) {
table.deleteRow(i);
rowCount--;
i--;
}
}
which has an alert message of "undefined". I tried .value and .text as well and no progress. How do I get the text from the childNodes?
View 5 Replies
Jan 22, 2010
I want to pull a random record from the db.
Here what I have so far.
Dim RandomNumber As New Random()
Dim num As Integer
num = RandomNumber.Next(1, 75).ToString
Try
Dim Cnn As New OleDb.OleDbConnection("File Name=E:WebRHIUDLShelf_Life.UDL;")
Dim da As New OleDb.OleDbDataAdapter("SELECT tbMaster_List.dbMFG, tbMaster_List.dbDescription, tbInStock.ID, tbInStock.dbMFG_Lot_Code, tbInStock.dbDateReceived, tbInStock.dbDateOpened, tbInStock.dbExpireDate, tbInStock.dbLocation FROM (tbInStock
INNER JOIN tbMaster_List ON tbInStock.LnkToMaster = tbMaster_List.ID) ", Cnn)
Cnn.Open()
Dim dtt As New DataTable()
da.Fill(dtt)
This is were I am stuck.
I need to filter all rows out except where row(index) = num
Me.GridView4.DataSource = dtt
Me.GridView4.DataBind()
Catch
Label1.Text = "Error: Unable to Pull Data"
End Try
View 7 Replies
Jun 10, 2010
I was put in charge of a database that has no source control, and all work was done in the database. I want to pull all the objects (stored procs, views, tables) from the database, and add to my new source control.
Is there a way to get all the objects into individual files out of a database?
Our database is SQL 2005. I have Visual Studio 2005/2008/2010 (beta 2) at my disposal.
View 5 Replies
Jan 19, 2011
In Web.Config file,I have <identity userName="CTX_DOMAINldapuser" password="ldapPW" />How can pull these userName and password strings in C# behind code?
View 1 Replies
Dec 15, 2010
I am currently developing a web site for our Student Council so members can check in and view the work they've done, sign up for tasks, etc. They will authenticate using their username provided by the school district's AD servers. How can I make it so that only their data shows up when they use their username?
Authentication method:
[Code]....
View 31 Replies