I am trying (with Classic ASP) to pass from a form multiple selected check boxes. These are the days of the week. On the receiving page I need to check for the selected days between a date range (eg. 1/12/07 - 24/12/07) and write those dats to a database.
eg. all mondays and thursdays in the date range. I can wite the thing in vba no problem but into a web page and no satisfaction.
i used formatdatetime(dt,vblongdate).it gives me in format like monday , august 8th, 2005.but i dont want weekday means monday or tuesday in my date so on.
<% prior = Request("Date")
if isDate(prior) Then prior = CDate(prior) Else prior = #1/1/1900#
For dt = DateAdd("m",-1,Date()) To Date-1
%> <OPTION value="<%=dt%>" <%If dt = prior Then response.write "SELECTED" %>><%=FormatDateTime(dt, vbLongDate)%> </option> <% Next %> </SELECT></center> </td> </tr>
I've seen alot of boring forms where a vbscript window will popup if the user submits a bad word in the form. Does anyone know of a tutorial or how to make a bad word filter written in asp that basically goes through an array of bad words and if detected the output would be something like:
I'm looking for an asp page to detect if there are any characters in my contact form that shouldn't be there. For example, if there is a "<" character, then this may mean there is html in my contact form, which is not good. I want to build a string that has all the values of my textboxes in my contact form. Its not working? Code:
I have set up a database, myDB, in MS Access. one of my Table, myTable, has columns Col1, Col2, ..., Col10. Depending on some scenarios, I insert some values in some (but not all) of the columns. Now I want to delete those records that their col3 is null or nothing is set.
I used col3= '' and col3=NULL in the below statement objRS.Open "SELECT * FROM myTable WHERE col3 = '' ", myDB, , , adCmdText
but none of them works.How to delete a record based on Null value filtering?
First, thanks to all who have helped me over the last few weeks !! I have a form that allows the user to select multiple options. These are user names:
Fred S Bob D Paul G Dave O
When the form is submitted, I'm getting the details using
user = request.form("user")
this is returning the mutliple options. What I would like to do is pass all the options to 'user' but at one point on the results page only show the first user selected, not the multiple selection
I need to build an ASP query to search a property size that is between minimum and maximum values (in two text boxes in a form). Here is the SQL statement I use:
mysql="select Center_name, Store_name, Address, Phone, Size, Type, APN from delamo where size >= '"&min& "'"
But when running the code I got an error message "Data type mismatch in criteria expression."Do I need to dim both min and mas as numbers?
I have very look strings which are o be stored into Textarea. The field in a memo.upto 3kin lemgth. What I woul like o do is format the text before it jits the testarea; eliminating thing like a single !,.:# which cause errors and then return it on the way back out to be placed back into htr textarea.
I transfer two search filters as defined from dropdown list on first page. The details are passed to my search page where i try to query the database to display the records which meet the conditions of passed variables. Code:
i have a database with person's data: lastname, language (these two columns used for filtering).
i've created a search page with a list menu with "language"s and text box for last name. how can i filter based on last name OR language OR both. how do perfomr a filter if one is missing (let's say "lastname")?
anyone have any tips on creating a search results filter to provide the best matches first? we're using an access database as part of a very small custom CMS, and we need to site search function that doesnt just output any base matches for a given term.
I have a Crystal Report 9 that gets its info from a SQL database. I installed the RAS in a Win2K server. The report lists from the database all the invoices. What I'm trying to do and I'm unable it's to filter the results and only show the one that I want.
I am making a small ASP application that retrieves data from a MS access file and what I'd like the application to do is to retrive only data about items that expire in the current month. I have been trying to figure it out for a while now and have not been able to find the right tools yet.
If I try to explane a little better then the problem is that I need this to work automaticly. I have already made the application retrieve the right data but I have to change the filter conditions every time a new month starts. What I need is to have these changes made automatic.
I have a set of db results that I cannot filter completely in my query and I'm trying to figure out how to eliminate the "duplicate entries" after the fact.
My problem is I'm pulling columns for lot number and transaction time, but some (not all) lot numbers have two transaction times so I can't filter out these double entries with a "DISTINCT" statement in my query since the transaction times are distinct, but I only care about the first one. I'm looping through pulling my results as such: Code:
I was trying to set up 3 menue drop downs for filtered relational selections of 1st-(Buildings), 2nd (Departments) followed by (Projects). I foillowed all the links and can not see how to get a onchange to work as relational menue. This would have been best. But 3 days later I am tight for time so I was attempting to just setup of the time being 3 seperate drop downs with submit. I can only get the departments to work. The building and projects will not filter as the departments. Code:
I am trying to filter a table of users to select only those records whose roleID matches a value in an array. There could be any number of IDs held in the array from one to a few hundred. The array is generated by splitting a comma delimited memo field from a second table in an Access DB. I can split the memo field OK, I can response.write its values, but what I now want to do is add a value from another table to my reponse write loop. Code:
If an ip address falls in between 29.0.0.0 to 29.255.255.255 then i would like something to happen. I m not too good with the sql math part but i figured it would be something like this
Code:
<% if Request.ServerVariables("REMOTE_ADDR") >= "29.0.0.0" or <= "29.255.255.255" then Response.write("hello") end if
I have a database with a table that contains date fields "startdate" and "enddate". How do I build a code in asp to select the data contained between a date range entered by the user?
I need to compare an IP address to a database that contains ranges for each byte in a potentially "valid" IP.
Columns in the msSQL db are IP1, IP2, IP3 and IP4.
The problem is that one entry in the database may have a range. If I were to query all four columns and concatenate the data, I may get something like this:
12.35.124.12-89
So if a user sends me 4 variables (1 for each byte in IPv4) over a form, how I would I begin to compare this data?
I'm trying to set up a random product feature on my site. Originally, I set up a hard-coded array of the ID numbers I wanted to randomize, but now I want to set it up so the random numbers are the ten most recent products. Code:
My SQL statement is returning either 0 or all members not just the members that are beyond todays date.Code:
strCountPaidForumMembers = "SELECT COUNT (members.membersSubExpires) AS totalPaidMembers FROM members WHERE (((members.membersSubExpires)>=" & date() & "));"
I have a db with dates. I have an sql select statement that is able to select records with a range of dates. The problem occurs when I choose a range of dates from 2 different months.
I'm querying to get an array of numbers. I need to find the "Middle %50" of that array of numbers. Is there a way to find the Inner Quartile Range using an ASP function? I cannot find any math functions that would do this.
Could I do it manually? Sort the values, split the array up, split it again to find the "Middle %50"?
I have this dropdown box and the options is TimeShift (6a-2pm, 2p-10p, 10p-6a ), im getting this data in a table (Acess DB) . My problem is how can i display (option selected) the actual shift based on the actual time. Code:
I have a requirement where I need to make a report for each auto dealer how many hits they got on specified date range, so for each car detail page I increment the counter and total it while doing that I store the last hit date, this gives the total hits for the dealer BUT does not facilitate date range
How do I give the user a date range so that he can check how many hits the dealer got lets say for last week OR last couple of days?
I have to put Date Range Query using start and end date form. I have tried but when i run the query puting start and end date value in form, no result shows the records and when i only put start or end value the result shows the records. Code: