More database traffic than the DataSet? [closed] - asp.net

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Forget the other details of the DataSet vs DataReader argument and tell me factually whether using the DataSet saves you from creating as many database queries as the DataReader does?
In my experience, it is clear that using the DataReader requires more database queries than using a DataSet. With the DataSet you can create one query (or stored procedure), disconnect, and then simply query the DataSet, leaving less back-and-forth to the database.
So factually, is the statement true that a DataReader creates more database traffic than a DataSet given the same scenario of cause.

A DataSet uses a DataReader to populate itself.
So the answer is no, a DataReader does not create more database traffic. It is the developer's understanding and usage (or mis-usage) that would create more database traffic.

Related

SQL Statistical Analsis [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I am planning a "statistics" page for a university project where lots of factoids will be displayed based on data from my Access database.
The statistics will be displayed in text format like so:
23% of drinkers enjoyed Life of Pi whilst only 15% of non-drinkers like it.
65% of teachers have read Othello by William Shakespeare whilst only 40% of policemen have read it.
[I have bolded the values I know how to retrieve in an SQL statement, and have italicized the percentages which I don't know how to compute]
User details include Boolean values such as smoker:yes/no or drinker:yes/no as well as the user's profession (there will be a limited number of professions listed in a combobox). These are all stored in a table called 'userprofiles'
I have a separate table called 'booklist' that stores the names,authors,title etc of books as well as a table called 'booklikejunction' where the likes for each book are recorded as well as the user's current User.Identity.Name
What would my SQL statement look like? And how would I display the results of my query in the format I have outlined above?
Just a hint (using ms-access SQL syntax):
select sum(iif([field1]='drinker',1,0)) / count([field1])
from [tbl_questions]
where ...
Not the cleanest way to do it, but it works

Get the number of users in my website - asp.net [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
how can I get how many people registered to my website?
in ASP.NET
You're not going to get much better then incrementing in Session_Start and decrementing in Session_End unless you use some other means such as a database.
When you are authenticating your requests you could update a timestamp in the database to show that the user has been active, and after a given time (say 10-15 minutes), the query thatcollects the number of current users ignores that row in the database (thus decrementing the count).

quickest way to convert Sqlite Database to MS - Access (2003/7007) Format [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
what can be the quickest way to convert a sqlite database to MS-access format, give that i dont have the table structure of the database.
my best possible guess is
connect to sqlite db, get table schemas, then duplicate the table data row by row.
i need the quickest way possible.
regards
raj
A simple way:
Install an ODBC driver for SQLite
In Access, create linked tables. You will be given the choice of linking to the table or creating a copy of the table and data in Access.

add new field to the standard aspnet_Membership table [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have added a new field to the standard aspnet_Membership table.
Now that it's added, how do i get or set this field by UserId?
Delete, plese.(5-8-2013)
You should not change default membership table . Instead use profile fields. Following articles will help .
http://weblogs.asp.net/scottgu/archive/2005/10/18/427754.aspx
http://msdn.microsoft.com/en-us/library/2y3fs9xs.aspx
I don't recommend to use the profile features due it have a way too dirty to store the data. Only if you need just one or two more fields, it may have sense.
Anyway, you need to attempt to document yourself a little more before ask this kind of questions...

what can be best - Dataset or datareader? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I have stock market application which will be frequently used by millions of members at a time.
What could be the best option to retrieve data from my database based on the retrieval time and Database load - DataReader or DataSet?
If you will have a large amount of people reading the data, then you should use the DataReader paradigm. This way you can quickly get in and out with the trouble of schema inference. I would also recommend that once you pull the data from the server that you cache it. Even if it is only cached for 1 second, that will improve the number of connections from the database that will retrieve the same data. Otherwise, you could quickly saturate your connection pool if you are not careful as well as some possible locking.

Resources