Select File Count
i have a bit of a weird question . I'm looking for a pull statement that pulls the number of files in a specific folder , But at the same time it wouldn't pull the number of pictures in this folder either . I have no idea how to write this code and I'm wondering if anyone could help me out?
View Replies
ADVERTISEMENT
I have tried everything possible and still I cant understand why one of the codes work.
This one works, uses a Form to get required info. Code:
View Replies
View Related
I need to set a variable to a select count(*) so I can check if something exists.
For example I have:
SQL = Select field from table where a = adf and b = fdad
set rs = conn.execute(sql)
variablec = rs("c")
But I want to do it with a count so i can use:
If variablecount > 1 Then
newvariable = true
down the line.
View Replies
View Related
My problem is using the SELECT COUNT to count the total of call in students. I get the correct count when they is no zero record. But when zero record returns, the count got mix up.. Code:
View Replies
View Related
How do I count the number of students in a table where their next_Action field is equal to "Follow up". Plus, how do I display out the result?
View Replies
View Related
Code:
dim sumv, mySQL, conntemp, rstemp
mySQL="SELECT COUNT(*) FROM crminfo where open = '1'"
call getFromDatabase(mySQL, rstemp, "sort2cat.asp")
if not rstemp.EOF then
response.write rstemp.count
end if
View Replies
View Related
using mysql - vbscript and oledb provider
I have a table with 2 records
I do this in asp
rs.open "select count(*) as countervar from sqltable" ,oconn,1,1
response.write rs(0).value or response.write rs(0) gives zero and not 2 as to be expected
Also I would also like to be able to do calculations like this
rs.open "select 10 * 2 as result" ,oconn,1,1
response.write rs(0) also gives zero and not 20 as expected
can't this be done?
View Replies
View Related
After i have SLECT COUNT(X) as "A" from....
I want to issue a condition to check for the number of records. this is what i do
Code:
SQL = "select count(*) as "A" from..."
set objRec = objConn.execute(SQL)
if objRec("A") = "3" then
is this statement correct? Doesn't seems working.
View Replies
View Related
Iīm trying to build a forum of my own but have stumbled on my first problem as early as the opening page.
To the problem: I want to show a simple forum layout with tables looking something like
this:
Forum Name | Topics | Posts | Last Post
---------------------------------------------------
General | 1 | 4 | Webmaster, 09 Feb -06
To do this I use the following SQL;
sqlPosts = "SELECT Date, COUNT(Date) as NrOfPosts FROM ForumPosts WHERE
ForumID = " & rsForum("ForumID") & " GROUP BY Date ORDER BY Date DESC"
But this doesnīt give me the right numbers. Instead of showing Topics to
be 1 and Posts to be 4 it shows Topics to be 1 and Posts to 1.
But if I use a simpler sql, like this;
sqlPosts = "SELECT COUNT(Date) as NrOfPosts FROM ForumPosts WHERE
ForumID = " & rsForum("ForumID") & " ORDER BY Date DESC"
Then it works, but I canīt get any other info from the table, like date,
userid etc. Code:
View Replies
View Related
is it possible to count the number of lines i a text file, whith the filesystem object. is it just stream.countlines ?
View Replies
View Related
I need help with storing the number of times a site get hits, and have the value stored in a text file, i could only get part of the code working , Code:
View Replies
View Related
We down load a text batch every day from the site to the local computer so we can run it through the carriers program to create the labels for items. I want to speed this up as much as possible thus once the item is downloaded a user should open up a page and it should detect the newest file and then begin to edit this.
(Finds | and splits down by product so I can do type of posting and if 2 items need 1 label then don;t waste or if going royal mail instead put into another database!)
So basically - can I select newest file from folder as there is no easy pattern name wise. In terms of the name the batch number goes up once per day and so it xyz99.txt so I would need to find 99.txt etc...
View Replies
View Related
I've got a csv file with names, addresses, emails, etc. I've been asked to randomly select a name from a csv file. I've found plenty of RandNum examples, but I'm not sure how to apply it to these names. Can anyone point out a sample I could use?
View Replies
View Related
While i'm here, do you know how to select a random word from a text file?
Txt file is like this:
word 1
word 2
etc.
View Replies
View Related
I have <select muliple> in one of my update forms - ASP. This update form also handles a file upload (enctype="multipart/form-data"). The problem is I am not getting the mutiple values of the select option after submission. Only the value of the first option selected is retrieved. How can I fix this or modify the script to get all the values selected.
View Replies
View Related
What would be the easiest way (JavaScript?) to have the attached form redirect a user to a sample business card on select from the drop down menu and response.write to the new file, carrying over the info the user inputs into the form? I want to change the response.write to the sample1.asp, sample2.asp etc.
View Replies
View Related
I would like to use ASP to populate a select list from a comma delimited txt file.....
View Replies
View Related
I have written some code which should dynamically build a table which is then populated with questionas and possible answers. The format of the answers will vary ie they may be in the form of a radio button which will be rated from 1-5, checkbox or a selectbox.
The first problem I have is if I do not comment out <select></select> I get an error message saying the page can not be found. when I do take it out I get asp timeout. Code:
View Replies
View Related
I have a column n_fog defined as text. In this i have numbers or blank value in it.
For example i have 5 records
Record - number
1 - 2
2 - 2
3 - ''
4 - 3
5 - ''
What i want to know is get the total of the numbers. So it should give me 2+2+3 = 7
How can i do it?
View Replies
View Related
I have a link like this
<a href="/mainfolder/one.pdf"> view pdf
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.
View Replies
View Related
For example take below as my array
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
Bill = 3
Ben = 2
Ria = 1
John = 1
Gemma = 2
View Replies
View Related
I have a problem with the below which I can't understand..
SQLcount ="SELECT COUNT(dates) AS total FROM dates"
Con.execute(SQLcount)
Response.Write total
And it doesn't return anything..
When I ask Isnull(total) the answer is "False".
So, if it has a value, why doesn't return it?
View Replies
View Related
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.
View Replies
View Related
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:
View Replies
View Related
I have to do this client side as well as server side
i have a field where a user can enter alpha numberic values
i want to count the integers or numbers seperately
can someone tell me how to do it
for example a user enters a3re4567
so there are 34567
so there are 5 integer or 5 numbers in that field
so i want to pop up an alert on client side.
View Replies
View Related
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")
View Replies
View Related
i am trying to pull a count from the top 16 records in a db.
select count(top 16 (username)) as cnt2 from bracketdb_"&tourney_id&" where
username <'BYE' order by POS
this is what i need to do, however, it doesn't work. i am getting a systax
error near TOP.this is using SQLdb
View Replies
View Related
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.
View Replies
View Related
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
Code:
set rs=objRecordset.Execute(sql)
and plug in
Code:
variable = <%rs.fields("fieldname")%>
View Replies
View Related
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?
View Replies
View Related
how can i create a number that goes up by one everytime its goes throgh a loop. would it be like this:
dim numbercounter
numbercounter = 1
do while numbercount eof
numbercount +1
View Replies
View Related
How do i Count Records with "the same values"?
Name, Age, Sex
John, 20, M
Barry, 24, M
Eve, 19, F
How do i Count the Males and Females?
Like "There is currently 2 M and 1 F registered"
To count them all I would just use rsTable.RecordCount, but dont know how to Count them the way i want them to.
View Replies
View Related
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 students 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?
View Replies
View Related