Assigning A Boolean Of True Or False To VBScript Variable...

Is there a way I can assign a value of true or false to a VBScript variable? I have a function where I want to initiate a value of false: Would this work? Code:

View Replies


ADVERTISEMENT

True Or False In A Yes/no Field

in one of my sql queries on an asp page i am trying to select some data from an access table. The problem is the search criteria is based on a yes/no field. I need to find any record where the value is null or true. So far i have this:

if ISNULL(orseof("Returned")) OR orseof("Returned") = True then

the ISNULL section works it is just the = true bit that doesn't.

View Replies View Related

True Or False Quiz

i m trying to create a true and false quiz which accesses the questions from a access database processes the results and then writes back to the database

I dont know how to structure the code for the radio buttons,i also need to give the user immediate feedback, but i cant use pop up boxes

View Replies View Related

ASP CHECKBOX: How To Send True/false To DB

Been having problems sending a true/false value to my database from a checkbox/radio group. Using checkboxes.... Code:

View Replies View Related

Random True/false Quiz

Here's what I want to do (i'm kind of there in JavaScript, but want to move it to ASP).

I have 17 different html pages. quiz1.html > quiz17.html.

The user says take a quiz and it pops up a window holding quiz1.html.

Within each page is a true/false question. Upon answering the user is told:

1. what they answered.
2. if that is correct or not
3. a corresponding sentence about the question.
4. an image the corresponds to if they were corect or not.

(This is all done in javascript).

----

However, now I want to take these 17 questions and randomize them and choose 6 questions.

For example:

The window pops up and it's question 1 they do that then move to the next one. 1-6 (random out of 17.

I'd like to do this in ASP.

View Replies View Related

Display Ms Access True/false Fields As Check Marks On ASP Page

what is the easiest way to display Yes/No, True/Falst, On/Off MS Access fields as check marks on an ASP page? it would be either checked or unchecked.

View Replies View Related

Boolean Variable Concatination

if a declare a variale say
Dim Flag
and assing it to true a boolean value
Flag = True
and if i try to concatinate it with another string like
mystr="<my-str>" & Flag & "</my-str>"
and if the machine is non english the mystr will contain something like
<my-str>that language characters</my-str>
what should i do to get True in mystr what ever the Language of windows is.

View Replies View Related

Assigning Variable Value In Global.asa

I'd like to have a variable that I assign a value to for an entire website. It's a variable that contains the DSN name for my ADODB Connection.

This variable value is necessary on every page on the website. Is it incorrect to assign a variable the value in global.asa so it just stays for the entire site?

View Replies View Related

Assigning A Default Value To A Function-variable

Well, it's quite simple, it's easily done in C, but in ASP (and VB in
general) i haven't been able to see it done...

function setvalues(var1, var2="a", var3="b")
if var2="a" then
response.write("Var2 wasn't defined")
end if
if var3="b" then
response.write("Var3 wasn't defined")
end if
end function

I hope it makes sense, and that someone has the solution to it...

View Replies View Related

Xml Variable FALSE

I'm not too familier with XML, this is probably a simple question but in my script I use this:

...
xml.Open "GET", url, FALSE
xml.Send()
Response.write xml.Responsetext
...

now, this is probably a very simple thing and I'm blind or something but how do I make it do something besides just quitting if it's false???

View Replies View Related

ASP VBScript Fails When Response.buffer = True

I have a big asp file that has an error under certain conditions -- totally
repeatable. However, it only fails when I set response.buffer = True at the
top. WHen I set it False in order to debug it, it works every time! I even
set it to True, but did a .Flush just before the error, and the error won't
happen.

It only happens when response.buffer is True and no .response.flush is issued.

The error is a string variable turns-up empty and crashes a function
requiring a date. I could test for this before the line where it crashes,
but where did my data go? Why is the buffer affecting it?

View Replies View Related

VBScript Variable

I have an ASP project where I have users select or input values into a criteria page and then once they press "Submit" the ActiveX viewer displays the crystal report. All works fine and the criteria can be somewhat dynamic because the variables are used to build a SQL statement that is passed to the crystal report as the dataset.
What I would like to do is create a variable on the Crystal report that will display the SQL statement or at least an English translation. This variable will be used to display the criteria of the report so end-users can see what criteria was used to generate the output of the report.

View Replies View Related

Make A Variable In Vbscript

I'm dividing two variables and on some instances the results going to be a long decimal. I want the decimal to round up to only one pace tho. How could I do something like that? My coding looks like this.. Code:

readscore=rsgameinfo("readerscore")/rsgameinfo("readervotes")

View Replies View Related

Variable In Flash To Vbscript

I want to pass a variable by way of a querystring (or any way that's possible) from flash (actionscript) to vbscript. From there I want to save the variable into a MySQL database. I understand the vbscript part but how would I transfer a querystring from a flash program to vbscript?

View Replies View Related

Reference VBScript Variable

This is my VBScript function:

<script language="JavaScript" type="text/JavaScript">
Dim UN
Set objNet = CreateObject("WScript.NetWork")
Set objUser = GetObject("WinNT://my domain/" & objNet.UserName )
UN = objNet.UserName & " (" & objUser.FullName & ")"
</script>

How can I reference the VBScript Variable UN in my ASP code? <%=UN%> won't work because VBScript is on the client side and ASP is on the server side. If I have to post it on one page and read it on another, how do I do that?

View Replies View Related

Accessing A VBScript Variable From JScript

I have the following code in an ASP page but it does not seem to allow a JScript to access VBScript variables. But if a VBScript accesses a variable in declared in a JScript TAG then it seems to work.

<SCRIPT LANGUAGE ="VBSCRIPT" RUNAT="SERVER"
Dim tes
test = 10
</SCRIPT><SCRIPT LANGUAGE ="JSCRIPT" RUNAT="SERVER"

Response.Write(test)

</SCRIPT>

View Replies View Related

Storing Sql Output Into A Vbscript Asp Variable Aid

I tried the search function but I can't really identify what this kind of issue would be called (Searching store variable comes back with hundreds/thousands of hits).

I am doing an update form which opens 2 SQL connections (its easier for me to do this cause I mess up joins to a significant degree, that and performance is not a big worry, eitherway).

<notes> Both connections are open, one is called rs, the other is called articlers. I have 2 databases (named database1, and database2), and I have two different SQL strings (SQL and articleSQL, the problem comes in the 2nd string and in storing a variable. Code:

View Replies View Related

Change Variable Type In VBScript


<%@ Language=VBScript %>
<%
dim a
dim b
a=11
b="11"
if a=b then
Response.Write "a=b"
end if
%>
But can't shows "a=b".How can changes variable type?

View Replies View Related

Pass A Javascript Variable To Another Page But Vbscript

I have an input box when the user clicks on the button.

var number=prompt("enter journal number");

How is it possible to pass this variable forward but to vbscript? So i could use that variable in an sql procedure?

View Replies View Related

Passing Variable From VBScript To ASP Page Using Form

I have a Function in VB Script that generates a signature. I assign the result to a variable and then need to do a hidden post to an ASP Page for further processing.

Basic functionality is I have a button upon pressing it -- It does the hidden post.

Code looks like this. Please assist with passing this stringToSign variable to the .asp page via hidden post. Code:

View Replies View Related

Launch Sqlcmd In VBScript And Save Results To Variable

I want to use vbscript to run a script multiple times and save its results to a text file. I have practically wrote this script before but only using a sql command wrote in to the script. However, this is a lengthy sql file so can not be directly entered in to the vbs script,s o I would like to run it using sqlcmd.

"SQLCMD -S "&WScript.Arguments(0)&" -i "&WScript.Arguments(1)

I have tried Googling this problem but found very little information about it. Any discussions online that I have found show no code and assume you already know how to do it.

I have found this so far:

Set objShell = CreateObject("WScript.Shell")
Set objScriptExec = objShell.Exec("sqlcmd -S "&WScript.Arguments(0)&" -i "&WScript.Arguments(1))

But how do I get hold of the results in to some kind of variable?

View Replies View Related

Boolean Problem

I've written some code that creates an sql statement in a string to update a boolean value in an access database, however, I dont know what value to give the field to update the boolean value in the access database.
I'll paste some of the code so it makes more sense.....
(note: the 'Booked' Field is the Boolean)

strSql = strSql & " UPDATE HolliesBookTbl SET Booked = '-1' WHERE "

'loop through the checkboxes which were ticked
for i = 0 to ubound(arrVals)
if i = 0 then
strSql = strSql & " DateID = '"& arrVals(i) &"'"
else
'only add the " AND " if this is not the first value
strSql = strSql & " AND DateID = '"& arrVals(i) &"'"
end if

I've been pullinhg my hair out over this

View Replies View Related

Boolean SQL Statement

I have a boolean field in an access database. I want to write an SQL statement which pulls out all records from the table MemberInfo where the field Online = true.

This is my code

sql = "Select * From MemberInfo Where online=true"

This doesn't work, do I need quotes around true?

View Replies View Related

Boolean Search Expressions?

I'm trying to add a search facility to a page that looks for matches in one,
other or both memo fields of a database. The code below works fine if the
visitor types in one word, or the term just happens to exist in one of the
queried fields.

What I'd really like is for a visitor to type in an expression, or query in
the same format as you would use in a search engine and it would find
appropriate matches. Any ideas how I can modify the code below to do this?

View Replies View Related

Assigning Values

I know I can use

Dim Array1(item1,item2,item3)
Session("Array2") = Array1

To copy a local array to a session array. What syntax do I use to copy a local array to another local array (without using a loop to load each element)?

View Replies View Related

Assigning The Result

How can I assign the result of a SQL-query to an ASP variable? This is what I have so far but it doesn't seem to work. Code:

dim strSQL
strSQL="select TestID FROM TestID_Description WHERE CL1='" &Request.Form("CL1")& "' AND CL2='" &Request.Form("CL2")& "'AND CL3='" &Request.Form("CL3")& "'AND CL4='" &Request.Form("CL4")& "'AND CL5='" &Request.Form("CL5")& "'AND CL6='" &Request.Form("CL6")& "'"
objRS("TC_Number")=objConn.execute(strSQL)

Maybe it's interesting to know that TC_Number is the primary key of the table.

View Replies View Related

Pass Boolean Parameter To JS Function

I have a simple JS function that I want to return a true or false value based on the parameter passed in. At this point of time I receive the error "'True' is undefined". Here is my code:

View Replies View Related

Boolean Expression Not Being Eval'd Correctly?

I have some code that checks security permissions in a DB, and before my conditional statement that checks these permissions, I am writing out both values to see what the statement looks likebefore it is evaluated.

The problem is, it seems to disregard the condition and always returns True, even if the condition should be false...any ideas? I also did some testing to assure that the length of the two values I am comparing is 1, just in case they were possibly holding spaces, and I verified they are numeric as well. I am just stumped here...

Let me also preface this code snippet by saying, I am using this asp script to generate javascript menu choices...and I did include some commented debug statements so I can see what the javascript rendered.. Code:

View Replies View Related

Assigning An ASP Object To A Jscript Var

I have an ASP variable containing an XML object, i want to pass this object to a javascript object .... how can i do that?

one solution i know of is to write the xml in the page as an xml island and retriving this code using the document.getElementById....

is there another way where i can do that directly?

View Replies View Related

Using Checkbox For Assigning Items

I have a catalog of books which need to be categorized into different
groups. Some of the books can be listed under more than one category.
I'm creating a page where I can assign a group of books to a category
by checking the checkbox next to their name (say I've looped out 100
of them, and check some, and not others) then submitting the form for
processing, so that those titles where the checkbox is checked will
get the categoryid number assigned to them on a one-to-many table

I need to know how to read the checkbox value as it comes in if it is
selected or not, if it is, I'll send the isbn in one direction, and if
not, I won't send it at all.

So, how would I read this on the sheet that grabs the values?

View Replies View Related

Assigning Values In A While Loop

I don't know if this is possible, but I have a Do While Not rs.EOF loop that is pulling values from a SQL database and writes it to an html form. I'm trying to figure out how to tally the values as they are siphoned from the database -- I'm assuming I have to set a unique variable equal to that value as it goes through the loop, but I'm not certain how to pull it off. Code:

View Replies View Related

Text File Boolean AND Search Problem

I trying to search a text file using a boolean AND search. What i want to happen is when a user types in type values to search e.g. Name Department (Taylor marketing) i want it to only read out the lines which contain both values.

At present it reads out all lines with Taylor in and all lines with marketing. The code i have so far is: Code:

View Replies View Related

Assigning An Invoice Number To An Order

I am trying to assign an invoice number to orders that are made on my website so that i can combine multiple order numbers into one invoice number. Here is the code i am using to insert the invoice number into the orders table.

It works if there is only one order in the table but if you try and order again it multiplies the orders by the number of invoice rows for example if there was 3 invoice fields it would add the same order 3 times into the order table. Its got stuck in some sort of loop. Code:

View Replies View Related







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