Split Single Variable To Get Multiple Variables

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.

variable1 = 01
variable2 = 00005
variable3 = 03

View Replies


ADVERTISEMENT

Single Cookies For Multiple Counters

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.

View Replies View Related

How Can I Split A Value Of Variable Into Several Parts?

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". ?

View Replies View Related

Edit Multiple Records In A Single Table

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:

McNabb, Donovan QB PHI ActiveReserve
Droughns, Reuben RB DEN ActiveReserve
Johnson, Rudi RB CIN PIT ActiveReserve
...etc...

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?

View Replies View Related

Splitting Multiple Tiffs Into Single Pages

How Can I extract multiple tiff images into single images through asp
programming?

Is there any free dll's that I can use in ASP to split multiple tiffs into
single tiffs?

View Replies View Related

Multiple Queries On Single Connection (classic ASP And ADO)

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:

View Replies View Related

Single Update Button, Multiple Updates

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?

View Replies View Related

How To Update Multiple Records Into A Single Table

I already have this piece of code that inserts multiple rows of data into a single table at once. Code:

View Replies View Related

Multiple Split Functions And Looping Through Them

I have the following code:

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 ...

View Replies View Related

Retrieving Multiple 'values' In A Single OPTION ITEM

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:

View Replies View Related

Creating A Single Binary Log In A IIS Server Containing Multiple Websites

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.

View Replies View Related

Split Function And Multiple Select Drop Down

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?

View Replies View Related

Split String To Perform Multiple Insert

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.

Curently inserst like :-

View Replies View Related

Multiple Pages Pulling Form A Single Text File

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?

<option value="fac 1">fac 1</option>
<option value="fac 2">fac 2</option>
<option value="fac 3">fac 3</option>

View Replies View Related

Multiple Variables

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

choice = InsertAP(Request.QueryString("companychoice"))

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>"

View Replies View Related

Variable Variables In ASP?

How do i refer or even create a variable of a variable in ASP.

(equivalent to PHP's $foo{$bar} ) ?

View Replies View Related

2 Variables As One Variable

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'

View Replies View Related

Compare Multiple Variables

On a form I have 8 combo boxes. When the form is submitted I want to make sure the combo boxes all contain unique values.

So I have eight variables. I tried to test them using:

If a<>b<>c<>d<>e<>f<>g<>h Then

but apparently that doesn't work. They are not in an array.

What's the easiest way to test them against each other to make sure they are all different?

View Replies View Related

Multiple Variable Search

i have a form (22 different criteria although I'm only showing 3) and want to be able to enter criteria into and have it search the database. Code:

View Replies View Related

Multiple Variable Match

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.

View Replies View Related

How To Include Multiple Variables Without Having To Write Them All Out

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

View Replies View Related

Passing Multiple Sets Of Variables Into SQL

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:

View Replies View Related

Arbitrary/Variable/Dynamic Variables?

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)?

View Replies View Related

Getting Multiple Records Fields In One Variable

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.

View Replies View Related

Error In Passing Multiple Variables In A Href

I need to pass multple variables in a link in order to go to a asp page with
the two varables.

The following are the values of the variables using response.write:

<%'Response.Write Mypage & "<br>"%>
Exp

<%'Response.Write GrantID & "<br>"%>
4836

The link which I wrote is as follows:

<A HREF="mainreportagain1.asp?grantid=<%=GrantID%> & page=<%mypage%>">Report
Main Page</A>

However, when I am refreshing the page to click this link I am getting the
following error: Microsoft VBScript runtime (0x800A000D)
Type mismatch

View Replies View Related

One Large, Or Multiple Small Session Variables

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.

View Replies View Related

Split Function To Split First Letters

I have a variable which holds college names

strcollege="University of California"

i want a variable to save UoC

what i meant was there are 3 words University of California

so i want the first letter in each word to be stored in a variable ....

View Replies View Related

Split Array But On Every Second Split?

I have a string

212334||327362737||437437||47347837||8347834||

etc

but i want to enter them into a databse

but it must be as 1356235 then field 2 is 125662

dont know if this makes sense

each number is a team in a match so team 1 plays team 2, enters into databse
then move on to the next 2, in that array.

i cant seem to get it to do 2 at a time, without ending up with an endless loop or team 2 being team 1 on the second entry.

View Replies View Related

Multiple Word Variable Into "Value" Parameter

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.

View Replies View Related

Single Value

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).

View Replies View Related

Return Single Value In Asp/sql

I'm assuming this can be done, but I can't seem to get it to work... I'd
like to easily return a single value from a sql statement, something like:

"intNewItems = conn.execute "SELECT COUNT (ItemID) WHERE ItemDate = Date()",
where conn is the connection object, etc. What am I getting wrong?

View Replies View Related

SQL And Single Quote

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?

View Replies View Related

Single To Integer

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?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved