In ASP page, if we want to retrive the number of rows in database: should we
use recordset object? Since this is not update, insert, delete, or select
statement
sqlStmt = "SELECT COUNT(*) from table1;"
Set objRS = Server.CreateObject("ADODB.RecordSet")
objRS.open sqlStmt, strConnect
I have the following SQL Statement that keeps giving me an error:
SQL_ITEMS5 = "SELECT Ratings.Category AS CATEGORY1, Count(Reviews.Rating) AS CountOfCategory FROM Ratings LEFT JOIN Reviews ON (Ratings.Category = Reviews.Rating AND Reviews.cUserName = Request("UserName"))GROUP BY Ratings.Category"
Im trying to get a count of the number of records in the Reviews table that matches the records in the Ratings table for each User.
<% Dim State, Names, i State = Request("State_Query") Response.Write(State) & "<BR>" Set RS = objConn.Execute("Select Analyst From State_Analyst_Table Where St = " & State) Names = RS.GetRows() For i = 0 to UBound(Names,2) Response.Write Names(0, i) & "<BR>" Next %>
I am trying to use a variable "State_Query" that I get from a previous page in a query on this page. I get an error that there is no value passed to the parameter on the execute line.
I have been using Dreamweaver to produce an ASP site uploading to an Access database and have hit a bit of a problem – one which has made me re-evaluate how I make sites.
I think it is time I stopped relying on Macromedia and started learning proper hand coding.
My problem is this:
I am uploading an image to a folder on the database, and from the same page trying to insert records.
The upload image works fine, the script is all ok.
It’s the insert statement I cant get to work. The SQL is sound, I’ve tested it in Access itself, but the problem is, that without the help from Dreamweaver, what is the syntax to execute the command?
what i want to do is find out how many times the pdf was open
so a member logs on the website goes into member section on that page he sees a pdf i want to find out how many times did he click on the link and opened the pdf
i have a field in the table that will store the count value.
myArray[0] = Bill myArray[1] = Ben myArray[2] = Ben myArray[3] = Bill myArray[4] = Ria myArray[5] = John myArray[6] = Gemma myArray[7] = Gemma myArray[8] = Bill
I want to be able to count the above and produce a list like so
What I want to do is count records in a table. if that count result is an even number do something, if it is an odd number, do something else. sortof like this.
set row_count = conn.execute("select count(clan_name) as cnt1 from clans")
clan_cnt = row_count.fields.item("cnt1").value
now this is the part i need
if clan_cnt " is odd" then do something else do something else end if
can someone shed some light on this for me please?
any help would be great, if even steering me in the right direction of some site. would love to figure this out on my own, but just need a shove.
I'm selecting a wide range of records. Some of these records may have duplicates in one value but some may not. I want to display the records as one and have a seperate display that counts how many there are WHERE the field is equal to a certain value. Code:
I m trying to use "select count" in order to retrieve the total number of a value in the database using the code below, but it doesn t seem to work. I get the following error mesage:
Error Type: ADODB.Recordset (0x800A0CC1) Item cannot be found in the collection corresponding to the requested name or ordinal.
i checked all the fields in the table, but i dont know if the syntax is wrong.
the code starts here--->
set rsTypes = con.execute("SELECT COUNT (cat) AS Total FROM firstmarch")
I have a Access database with two tables; a category table and an images table.In the Category table I have a field for Index number and a field for Categories. The images table has a field for all the images and a field to specify what category the images are assigned to.
I am trying to write a simple Select query that will return a list of Categories from my Category table, and in the second colum a count of the number of images assigned to each category from my main table of images.
I'm using SQL/VBScript and need to get the number of records found in a DB search. I'm using. where I need it, but in this case, how would I access the info?
Code:
"SELECT COUNT(*) FROM Locations WHERE Location = 'Paris SBDC'"
How do I access the results? I'm really new to SQL and ASP, and the way I usually query a database is
I'm having a little trouble trying to fix a little problem of mine. I have an SQL statement which counts all of the records of a certain type. Its fine up to here.
What I want to do is do a Count on a field where the value is > 0 and then do this for several fields in one SQL statement. how I may do it?
WEll I see that this issue is not yet solved ... So here's some more beef... There is an update the first part of the query that takes ~50 seconds and the connection gets cut off at 30 sec sharp. Logical as the default value us 30 sec. question :Does anyone know how to increase that value? I can't do it in the udl , it reverts back to nothing. Option: [1]I would/could also optimize that update using a hint to fasten it [2] Or try to execute the proc without using the dsn?
Using ASP 3 on an ISP account (I don't have access to the root of the server). I have a page that does some intake processing and I'd like to have it run every 5 minutes. Right now, the only way I can see to do this is to have a client task that wakes up every 5 minutes and opens that page.Is there a better way?
I recently moved an app over to IIS 6 from IIS 5. Everything works great! I use ASPExecute to run an .exe - but it doesn't fire. It just sits in the process window. Doesn't do anything. Is IWAM, or IUSR or both required to run it?
I need to use a VB6 dll like an ActiveX in ASP page. This dll use other .exe that is configured en DCOMCNFG and this dll is configured too in the same environment (DCOMCNFG) like a DllSurrogate with an specific user administrator.
I don't know how to configure this dll & IIS to it works with Anonymous authentication. I need to do this because is a development that it works in an Internet environtment and I can't assign a administration user in IIS 5 to the anonymous user.
Course_Info and Students. Course_Info holds all the information for each course that a student can sign up for. The Students table holds all of the student’s information. The field that ties the two tables together is Course_Name.
I have an admin page that I would like to display the total number of students enrolled for each class. How can I count the records in the Students table, and then display the total number of students that are enrolled in each individual classes?
I'm trying to output some data from the db into a table but I'm getting a number of problems with the layout if all the words are together. The table stretches across the screen. I want to be able to output a number of words/characters and then insert a line break and then carry on with the rest of the output.
I got a problem with my printer friendly page. The problem is the total character has overflow the max character per line (no 66 in my print screen) and this affect my page counter no. Is there a way for me to fix it like a function to check the total no of pixel? Code:
I would like to create a count on each page (I am making a global include), and I want to display the number of users on that page. Also, I would like to show the most poular pages. I would like to do this without a database, prefereably using Application objects (or if their not objects...what ever thay are). I know that this may be difficult, but does any one know how I could accomplish this?