This is a simple question, but is been a while since I program in ASP and I forgot.
I have a variable like this: 01-00005-03
I need to have 3 variables from that single one... Something like this, from that variable, let for example that is called fullvariable, split it and get the following variable values from it.
I have written an article program, which has a collection of articles that people can click on and read. It's like a forum but without the reply function...
I want to write a counter for each article, but it cannot be done without cookies...my question is: how do you use a single cookies to determine which threads have been read and which haven't.
I have a parameter, directory, which has value of "dir1/dir2/dir3". How can I extract the values of dir1, dir2, and dir3 from the directory="dir1/dir2/dir3". ?
I am using a db to hold student data records. I currently display them in a roster based on their affiliation with a certain class. To edit a record I need to click the name of an individual, it opens an edit page, I make the changes, hit submit and return to the roster.
This is pretty standard stuff. What I would like to do is change one field of every record without opening each record individually. The idea comes from my Fantasy Fball league roster:
Where the example above says "ActiveReserve" is a pull down menu that lets me change who is playing week to week. I can then change each record, hit submit one time, and update the db. So how do they do it?
I'm building a page to display a series of records but wanted to filter the results by location and display the resulting records under their own sub-heading.
All the records are in the one db table and there'll be a total of 5 queries.
I'm unsure whether I need to open and close the connection for each query, or whether it's better to open one connection, run all the queries and then close the connection at the end, if so, the resulting code would look like: Code:
I'm trying to create a single form to update multiple records in a database (Access). Similar to an update qty's in a shopping basket, whereby, on submit/update it passes and updates each record, without using the ONCHANGE feature (otherwise this would become an extremely laborious task in this application)
I've tried passing and updating an array but to no avail (maybe I'm doing something wrong)
Also, I can't seem to grab the contents of the form text field, even though I'm dynamically assigning names to each text field.
Should I be using Javascript to handle the change in values, if so, anyone got any sample code/helpful links?
that requests both products, quantity and price from the previous page and sends to the next. Now i would want to be able to iterate through them all and run some code based on the values.
Now it works well only for the first items, then throws an error ...
I have a difficult technical challenge I'm facing. I need to retrieve multiple values for the very bottom item in the list, 'Federated' (ignore the rest).
The database will query based off the option 'value', however, in this special case I want to perform a retrieval based off of multiple of values. I want to try to use the existing code without reinventing the wheel. Code:
I am working with IIS 5.0 and would like use the property CentralBinaryLoggingEnabled which if set true will create one single binary log file in place of a separate log file for multiple websites.
This property is available in IIS 6.0. I would like to know if there is a patch available for IIS 5.0 which will create this property in IIS 5.0.
I have a multiple select drop down. It will load into it the following information: Student ID, Last Name, First Name
There will be another drop down box that loads with classes, only this is not a multiple select.
I need the user to be able to select all students they need from the first drop down and then select the class they want to insert them into. Then, when they hit the button, it will break up the data from the first, Student ID, Last Name, First Name and insert those three things into the database under those respective column names.
Does anybody know how I can split these up properly when there will be multiple students selected, or does anybody have a better way of doing this?
I have the belwo code which i mean to do an multiple checkbox insert. I have managed to get it so i puts all the checkbox values into a string seperated by a comma, and it insert into a database, however just not how i need it to.
I've got multiple pages on the same server that all have the same drop down boxes in them. It is a list of all our facilities. Every time there is a change, I have to change it on every page. They are in the format below. Is there an easy way to store all that data in a text file so I only have to update it one place?
I have an asp page that reads in a variable name via the url.but I need to recall the asp page with another variable but don't want to loose the first variable in the url.This piece of code sits at the top of the calllog.asp page,I am wondering if I can use the "choice" variable in the bottom portion of my code
This is the actual calling snippet of code - this is where I would like to use the choice variable as an option <% Response.Write "<a href=""calllog.asp?pNum=" & pageNo + 1 & """>Next Page</a> %>
I have attempted this as well: Response.Write "<a href=""calllog.asp?pNum=""& pageNo +1 & ""+companychoice=' & choice &'"">Next Page</a>"
I need to select a date range from my history table for customers that are 30 days out in billing I have 2 fields history.posted and history.transcode.I use select * from history where transcode ='P' and posted between('1980/01/01') and '" & FormatDateTime(Now()-30) & "
the problem is if the customer doesn't have any history it is not pulling them cause it is looking for transcode of 'P'
I have a web page programmed in ASP that creates a calling list based on the user's preferences, which queries the information from a SQL 2000 database. I want the user to be able to select whether to create different lists based on time zones or one list with all time zones.
The user should be able to mix and match time zones. However, I'm not sure how to do this task. An example would be that the user wants east coast and central in one file, then pacific and mountain in another, but it could also be pacific in one and east and mountain in another, and the possibilities go on. The database is set up with all the information needed, but I'm not user how to code in ASP for the different possibilities.
i have many different variables like addr, addr1, addr2 addr3 etc and i want this to occur
if addr = "" then error = "ERROR:You have not entered all the required information. <br>Press the Back Button on your web browser and try again." Response.Write error
But that only works for addr. Is there any way to include addr2 and the rest of the variables in that statement without writing it out 50 times
Before I created this thread, I've searched Google and used the search feature of this forum numerous times on how to do this, but couldn't find much.
Basically, I'm trying to pass multiple sets of values from the search form to the ASP into an SQL statement (Access Database).
I can only make it display different prices of a certain music type, eg all prices of rock. But it doesn't output all types of music for certain prices, eg viewing Classic and Rock records with prices of 8.99 and 10.99 only.
I've used the REPLACE command I've found and got around that problem of syntax with numeric/alpha data. Code:
I have a spare parts database that I am working on. All that needs to be stored is the part description, what it goes to, and the quantity in stock.
Since that's all that I need, I want to be able to allow the user to edit the quantity right on the results page, through a textbox. Just change the number in the textbox for each part, press the button, and voila, it's all saved to the database (and is redisplayed for your convenience.)
However, there is no set amount of part rows. Right now, I'm creating the text boxes using the id of the item (i.e., name="quantity<%=RS("partID")%>"), but I'm not certain how to call the variables to put in an insert.
What is the syntax for dynamic/variable variables (if they even exist in ASP)?
I've got 4 records in my lovely database table. The table contains 5 fields, lets say: id, number, name, age and sex. All I want to do is to get all the values (form all 4 records) of the "number" field and put all 4 of the values in to one variable.
The output have to look something like this : numbers: 001, 002, 003, 004.
I tired, honestly, I really did. But didn't find a solution.
Does anyone know the detail of how session variables are actually stored? The question I'm trying to answer is:
Is it more efficient to store and retrieve multiple short strings :
a) in multiple small session variables b) concatenated and stored as one large session variable c) inserted into an array and stored in a session variable d) it's all the same. Who cares?
Keeping in mind that for this application each piece of data will be retrieved for every page.
I've read that storing a dictionary object in a session variable is bad ews - something to do with ending up with thread in your apartment, or something ;-)
What I'd really like to do is create an XML object and store that in a session variable, but I'm guessing that would be pretty inefficient unless it had quite a lot of data in it.
I've run into this before, but have simply changed my plans to avoid it. This time, I'd like to solve it if I could.
Basically, I have a recordset being placed into a variable. Then, I am building a form, and trying to insert the existing value in the database in to the "value" parameter of an input tag.
var = statusRS("status_text")
<form action="something.asp" method="POST"> <input type="text" value=<%= var %> </form>
My problem is when the variable contains more than one word. Only one word appears in the text field on page load.
I have been using recordsets to access data from a database.I then loop thru each row in a dataset and assign the values to the objects on my web page.The particular sql stmt that I have right now, only returns a single value from a database. I need to assign this single value to a variable in my asp code. Can I do this without using a recordset?
If I have to use a recordset, do I just do var1 = recordset("columnname") (I ofcource create the connection object, the sql stmt and stuff first).
I have a simple form submission but the problem is my SQL insert (or update) is failing if in the text field there is any single quotes (') I tried running the like replace(textfield,"'","") to just remove them but it will still error out on me. is there any other way to format the variable, do I need to use an escape character?
I am trying to send a 'single' data type to a sql server db cell that is formatted for 'decimal' from asp/ado code and it is converting it to an integer. Should I be using some other data type in sql server?