I have several isbn's that are eather 10 or 12 charcters long. I need
to insert a dot . after the fifth character if it is 10 long, and
after the 6th character if it is 12 long. How do I count through the
string and find out if it is 10 or 12 charaters long, then insert the
dot . after the first 5 if it's 10, or after the first 6 if it's 12?
I know there is a way of stripping out special characters from a string however I need a way of stripping out "" marks from a string or what i really want is to replace all double ("") marks in a string with single ('') marks before inserting the string into a database. Is there a way of doing this in ASP?
But I can't find the same way to do it in vbscript using ASP! I simply want to strip the last four characters, but leave the rest of the string in tact! As the string could be any length, I don't know a start position.
I have this bit of code that stores the current web page address in a Session variable. I want to always remove the last four characters, such as E.asp, or G.asp, or I.asp.
I searched tutorials on string manipulation but all seem to take out a string in the middle of a string and replace it with something. I just want the last 4 characters removed.
I'm trying to strip out none alphanumeric characters (and a couple of punctuation marks) from a string before inserting into a database.
I've put in my code below, basically I thought I'd loop through each character in turn and pass it through a regular expression to check its validity. If it passes I'll add it to a global variable ('validString') if it fails I'll remove it.
But I can't get my Mid() function to accept 'i' as a value so it won't loop. Code:
what is the maximum number of characters that a string variable can hold - i initially thought it was 256, but after some testing it seems that it can hold much more than that..
I fould this code on another page and have included it on may main page. I would like to know 2 things. How can i cange the database connection to DSN less and i would like to know how i can add code to get the total hits and add it to a Field called "totalhits" in my access database. Code:
Is there another way to count the records of an access database that have a specific field other than using a SELECT statement and a recordset to loop through the records?
I am using a lot ASP to manage a db for the students I work with in a YMCA program. What do I need to change to be able to count and print the # of records (like on a roster)
<% fp_sQry="SELECT * FROM Results WHERE (Grade = 'Senior') ORDER BY Club ASC" fp_sDefault="Club=" fp_sNoRecords="No records returned." fp_sDataConn="2004" fp_iMaxRecords=256 fp_iCommandType=1 fp_iPageSize=125 fp_fTableFormat=True fp_fMenuFormat=False fp_sMenuChoice="" fp_sMenuValue="" fp_iDisplayCols=23 fp_fCustomQuery=True BOTID=0 fp_iRegion=BOTID %>
What is the best way to count how many times an image has been clicked? I have an image gallery on a site and want to count how many times each image has been clicked (clicking pulls up the full size image in a window) so that I know which are popular and which are not. I though about wimply adding an extra field to the database which serves up the image details, and incrementing a number by 1 each time a user clicks it just before the image is served up. What are the chances of this falling over if two people were to click the same image at the same time?
I need to find the total number of nodes in a binary tree structure ( Its for a mlm website), Also I need to count the total subnodes in leftside and right side separately.
Check the attachments, You will get the idea. Attachment contains database structure and Binary Tree Structure.
For example: If I had a table with the headings ID Colour Car 1 Blue Volvo 2 Red Fiesta 3 Green Mondeo 4 Red Volvo 5 Red Fiesta 6 Blue Fiesta
How could I use asp to count how many times say the colour red appeared in the table displayed in a numeric value, i.e There are 4 red cars in the able
I have a access data base that has several records. One filed contains a category numbers. Many of the records have the same category number becase they belong to the same category. How can I get the number of records that have the same category number? or should I say how can I count the records wich have the same category number?
Access database. What is the best method to count a field that has the numbers 1 - 93 in it, over 1008000 rows long. Trying to obtain how many times 1, 2, 3 etc show up in this field.
I have fields called EventName and EventVolunteer. What I want to do is do a count of volunteers for each event. Then as it loops though the database the results display next to the Event Name.
I would like to how to count the number of visits a person makes to a particular asp page. Let me give an example. Suppose a person is participating in an e-discussion.
we would like to know the number of questions he has answered, the number of questions he has just seen but not answered and the number of questions not at all seen by him.
I'm trying to count the number of occurances of a product as it is outputted from a database (the information has been split from the quantity so can't just use SQL)
I use - if RecordArray(0)="ProductName" then productoccurance=productoccurance+ProductQuantity
It counts some an not others or only a few. But the result is the same everytime. E.G, I have 10 occurances of product1 in the database the this script only ever counts 4. Any ideas as to what's wrong?
I need to display the count of days on the page where the start date is the result of the record set and the end date is the current date. So if the record set value was 3/04/2007 than the display on the page would be "3" ( with todays date: 3/07/2007 as the end date). I know I need to use datediff(d,???? ) you can see where I get lost.
I am trying to work out how to set up two counters on my site, one to track guest users and one to track registered users, like most forums show. There are loads of examples showing how to use the global.asa file to do a single active user count, but I can't find anything for my needs.
Has anyone come across such a script, or give me a clue how to write my own? All registered users are marked by a session variable called userLogged - which is true if they have logged in.
I am trying to count with time, like you can count with a date, but it's not working
In date I would do: DateValue(Now)+1
when I Do TimeValue(Now)+30, it does not display what the time would be 30 seconds later, but instead it shows me the time it is right now and sticks a weird date (1-1-1900) in front of it, what am I doing wrong?
I need to count the different values from within a database column. It's a "State" field so I'm trying to find out how many people from CA, from NY, from TX, etc.
I have no problem with the SQL to get the number, my problem is having this number displayed on the ASP page (it doesn't) ... I'm sure I'm missing something so I wanted to run it by here to see if someone could get me on the right path.
What I'm trying to do is list all the States on an ASP page and have a number beside each state representing the total for that state in the database. EG:
NY = 5 CA = 6 TX = 22 etc
Any ideas or suggestions on the best way to do this would be appreciated. I've tried some of the ASP "quick lessons" on the web but haven't really found anything that fits this situation.
I have an array which is made up of a selection of place names, such as "London, London, Lisbon, Paris, London, Madrid, London, Madrid", what I need to do is loop through the array and get it to find out which item is duplicated the most times, and then have this item equal to a variable, such as TopPlace, which in this case would be TopPlace = London, I have no idea how to achieves this, could someone offer me any help on doing this?
I am trying to show some stats. However I have four levels to choose from, which are shown as true/false. I want to count each entry by employee and categorize it only under the highest level achieved. One entry can have multiply Levels. Hope this make sense my mind is a little foggy today.
Here is the sql statement I am using. I have added the levels as or however I want to count each level but only the highest level achived. I don't know if it would be easier to do this in a SQL statement or in vb script. Code: