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


ADVERTISEMENT

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

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

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 View Related

Difference Between Environment Variables And Server Variables

can anyone tell me difference between environment variables and server variables.

View Replies View Related

Calling Com + Object Variable Or With Block Variable Not Set

I'm turning my application into a "DLL". Everything worked fine untill I try to do a "While" in my asp code. Then I recieve an error like this:

"Object variable or With block variable not set"

My vb code look like this.....

View Replies View Related

Passing Data From Javascript Variable To Asp Variable.

is there any way of passing a javascript variable over to a asp variable so
i can write it to my database.

View Replies View Related

Convert ASP Variable To Javascript Variable

How do I convert an ASP variable to a Javascript variable?

View Replies View Related

Referencing Variables Through Other Variables

I'm not sure how to best describe my problem, so a simple example should help explain things:

I have two arrays, called set1_data and set2_data

if I create a variable like so:

firstPart = "set1"

and then assign like this:

copyOfArray = firstPart & "_data"

how do I make copyOfArray reference the set1_array, as opposed to just a string "set1_array" which is what it's doing?

I've had a good rummage round ye olde Internet but couldn't find anything there must be a keyword or function to achieve this?!?

View Replies View Related

How Do I Put A Variable And A Non Variable In A From Statement?

sql = "SELECT * FROM & console &'news'"

I got that right now but i want the variable, console to be placed along with news so when it selects from the db it selects from gcnnews or whatever variable it's on. How do I do that?

View Replies View Related

Variable-variable=junk

im trying to subtart one quantity from another then stick the answer in to an update statment, but all i get is an error in syntax message

variable math bit=
qty=request.form("oqty")-Request.form("qty")

sql =
sSQL="Update spares SET spares.location='"&request("location")&_
"',spares.machine='"&request("machine")&_
"',spares.part_desc='"&request("part_desc")&_
"',spares.part_number='"&request("part_number")&_
"',spares.qty='(" & qty & ") "&_
"',spares.min_qty='"&request("min_qty")&_
"',spares.updated_by='"&session("name")&"' WHERE(spares.id)=" & form_id

View Replies View Related

Variable Name, Dependant On The Value Of Another Variable...

I need to assign a value to a variable, but this variable name is dependant upon another variable!! I am including the code below so you can see it, cos if not I am sure you are thinking whattt?? Code:

View Replies View Related

Variables In ASP

I am trying to build a web based database using Access and ASP. I can retreive data form the database in a web page. I can send data from one page to another. However, I am stuck trying to figure out how to make the data variable. I would like the second page to display only data the user selected from a drop down list in the previous web page. I tried using the WHERE function and replace the hard coded information with a variable, but it isn't accepting the code. Could someone please help with this? I have research mulitple sites and can't find this particular piece of code or in tutorials. I must be missing something because seems like it would be basic stuff.

View Replies View Related

Variables

I'm trying to reference a username variable that is saved after the user
logs in. I can reference it using $(Username) in standard html parts of the
page but how do i use it in the script sections enclosed with <% %>

View Replies View Related

Variables

How can I get the value of a variable set in ASP from
inside vbscript tags. Here an exampleCode:

<%
Dim x
x = "something"
%>
<script language=vbscript>
msgbox(x)
</script>

I need to display the variable in a msgbox but can within
ASP.

View Replies View Related

Asp Variables

on the page.asp it searches the database for the specific record with id=3.
now i cant use : variable = Request.Form("id"), because the information does not come from a form, and request.querystring doesn't want to work either.

View Replies View Related

Variables

I am new to asp and have tried a few things and cannot get it to work. I thought this code:

<input type="hidden" name="x_cust_id" value="<%= x_email %>">

would work for making the x_cust_id value equal what was put in the x_email field - but that doesnt work - any idea what Im doing wrong.

View Replies View Related

Variables

I have a webpage with a list of items with checkboxes and a submit button. On the click of the submit button, I call a vbscript that loops through the items and put the values of the checked items in an array or string, and then jump to a new page.

Now I either want to send this variable to the new page, or I want to save the values to a mySQL database table, so I can use the values on the new page.

It seems I can't use session variables (session.contents) for this because that's server-side only.

View Replies View Related

Using Variables

how can we use variables in sql statements

View Replies View Related

ASP.NET To ASP: Variables

Does anyone know how to get a variable to transfer from ASP.NET to an ASP page?

View Replies View Related

Getting Variables By Id

Is there any way to get input boxes by thier id rather than
thier name? (Request.Form("elementname")) I don't want to
have to give every box its own id and name when they are just
going to be the same.

View Replies View Related

Url Variables

I know that it's possible to pass more than one url variable using '&' querying 2 columns in the database.However,I want to pass both the words 'piano' and 'keyboard' to the same column [instruments] in a database).

Here is the code for just 'piano' and this works fine.

Search_quick.asp?<%="search="&"piano"%>

This is processed by a request.querystring("search")

View Replies View Related

Use Variables

I'm building an application that allows visitors to our site to view GPS survey data. The data is collected several times a day and the files written to a different directory each day. Thus, for July, there are 31 folders.

There is a calendar on the site that people can click on the date they want to get the data for. Then, a window will open and the contents of that days directory will be displayed in the window.

Our app is at http://test.c-b.com/CORS/ - the data is supposed to be accessed from the calendar but now all I can do is view the root files. I just can't figure out how to target another directory with the FSO using a variable passed from a querystring.

View Replies View Related

Variables In URL

How do I write variables in the URL like in PHP? Then, How do I pick up variables that are in the URL!

E.g. in PHP = main.php?name=David

Because i've just started in ASP from PHP and I was wondering how you goto a URL with variuables in...! And how ASP gets them from the address URL as it seems not to automatically pick them up.

View Replies View Related

Variables

I need to write a if statment to find a part of a word. By Example:

variable = "ASP Free forums"
if % variables % = "ASP" then
statment
else
exit
end if

I've tryed to uses the '%' like in SQL queries but didnt work. Is there any idea?

View Replies View Related

Variables

I have a number of form fields that I wish to temporarily record into
variables and pass to a small number of subsequent pages.

Is the best way to save each one to a session variable when I submit the
form and then to clear the variables when I no longer need them?

Also, if this is the best method, what is the code for saving a form field
to a session variable when the form has not yet been submitted. For
example, when I submit Form1, I want the contents of Field1 to be entered
into SessionVariable1 and then the form to be submitted as normal.

View Replies View Related

Set & Use Variables

how do I set &amp; use variables in Global.asax. i ve missed that chapter in the book i read.

View Replies View Related

Can't Get The Variable

I have many buttons that mapping many textbox, when I click button, I
want to show a string that contains button number( and the mapping
string ), but it failed.

Here is the code:
/////////////////////////////////////////////////////////////////////
<%response.write"<input type='button' name="'btUS95resone"&" a &"'
value='Save' onclick='resone("&a&")'>"%>


function resone(cnt)
{
alert("document.all.txt_note"+cnt)
}

////////////////////////////////////////////////

It seems that the component I called is not there...

View Replies View Related

If Not Variable

Can anybody tell me what is the asp equivalent of the php-phrase:

if (!$Variable) {}

?

Another question: is there a special syntaxis for asp conditions in condition?
I tried this code it doesn t work:

If Condition Then
If 2nd condition Then
ElseIf Then
End If

End If
And it works only when I remove the 2nd condition's End If and the ElseIf. Seems strange, no?

View Replies View Related

Variable

I have a text file that looks like this:

Artist Name: Kiss
Song Title: Rock and Roll All Night
Running Time: 04:38

And I need to be able to get the artist name and song title in asp and display it on a website. The thing is, the text file changes with the song being played on the radio. How can I do this?

View Replies View Related

VB Variable

I've been given an ASP app written with server side javascript. This app needs to get the username of the person currently logged in to windows (Request.ServerVariables("AUTH_USER") in vbscript). I found a way to get this variable in javascript, but then it wouldn't let me split it (server kept saying method not supported). So I've gave up on getting the username with javascript, and have set variables in VBscript at the top of my page. How do I access those variables within the javascript portion?

View Replies View Related

Variable

i have a textbix name "building" inside my system where the user might input one or several building name in it seperated by a comma. How can i extract each of the value in it? For example, "PG2, PG7, PG6", i want to extract each of them.

View Replies View Related

Variable In A URL

I have this url that loads, but in the url is the date, so I need a variable i can use so as the date changes the url is automatically updated,

View Replies View Related







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