Short Circuit Evaluation

I just go an error in an If statement as follow:

If rs.State=0 Or rs.EOF ...

In this particular case, rs.State was 0 and I got an error which is related with the Scripting engine trying to execute rs.EOF which of course through the error.
Is there any way to reach in VBScrit the same meaning of Short Circuit evaluation as C++ and Java do?

View Replies


ADVERTISEMENT

Evaluation Expression

A client wants have acess to an online databases records controlled by group strings and evaluation strings e.g., each use would have in his client record a group string like this:

[ROOT][ADMIN][ACCOUNTING][ABC PRODUCTS]

And each record in a database would have an evaluation string like this :

([ROOT] OR [ADMIN] OR [ACCOUNTING] OR [FINANCE]) AND [ABC PRODUCTS] OR
[ACME]) etc.

No limit to the number of groups or the complexity of the boolean expression evaluation algorithm. I need an asp function that I will just pass the group string and the evaluation string and it will return True or False as to whether the client can view that particular record. I can't find anything in ASP on the internet though this must be a common database control method for non-browser applications? Has anyone done anything like this in ASP?

View Replies View Related

Short Code

i'm breaking my head with this a hour now Code:

mySQLz="SELECT * FROM services WHERE serdraw=id AND shop="& shopp
call getFromDatabase(mySQLz, rstempz, "mozzzdiyexec.asp")

if not rstempz.eof then

response.redirect "message.asp?message="& Server.Urlencode("aSSSdded")

why this is not working...i almost sure that this is because that line
mySQLz="SELECT * FROM services WHERE serdraw=id AND shop="& shopp

id and shopp are numbers

View Replies View Related

Converting Short Php Script To ASP

I've got this PHP script working on one of my sites and now need an ASP version for my intranet. I don't know ASP, can anyone help out?

Know of anyway to NOT have a blank browser window open when clicking on the link or even a better solution to prevent spam harvesters? Code:

View Replies View Related

Sort Records By Short Date,

I like to pull the top 5 record that are closest to the current date but the date field can not be empty, see some records do not get assigned an expire date and others do. I want to show the closest expiring records.

objconn.commandtext = "SELECT TOP 5 * FROM merchants ORDER BY Expires"

What do I need to add to exclude the emtpy expires field records.

View Replies View Related

Short Format November Date Problem

I am having a problem getting a short format november date (e.g. 01/11/2006) to be passed in to an access 97 saved parameter query. October dates work fine but not November dates. Code:

View Replies View Related

Search Access Database Using Short Date

I have a database and i want to work out the sum of the discount field where the id is lets say 1 and the date is greater than 01/02/2006

The database hase records older than 01/02/2006 but I dont want them just the 1s dated 01/02/2006 to now

set RS3 = conn3.execute("select SUM(discount) from restaurantaccounts WHERE restaurantid=1 AND datepaid >=01/02/2006").

View Replies View Related

Change In Short Date Format Under Hebrew Regional Settings

This is regarding a change in the Short Date format under Hebrew Regional
Settings, that has caused huge problems in our ASP web application. The
change appears to have been introduced sometime before Windows 2000 Service
Pack 4 and has remained through to Windows XP. I am looking for a solution
that doesn't involve rewriting our application (much) and that allows all
our users to keep using Hebrew Regional Settings.

To summarize our problem - we have an ASP-based intranet web application
that is used in our Israel office. Before we installed Windows 2000 SP4 on
our web server and on the client machines in the office, the application ran
perfectly. Dates appeared on the pages and in input textboxes in the correct
dd/mm/yyyy format. Immediately after installing SP4, dates on the pages and
in input textboxes are formatted as yyyy/mm/dd. This is not just a visual
change, it has caused many functions in the application to break. Code:

View Replies View Related

Comapare General Date With Short Date

I am trying to construct an SQL statement that can grab all of the entries out of a table, where the Date field consists of today's date. The Date field is called 'DateTime' - and it is in a General Date format (DD/MM/YYYY HH:MM:SS). I obviusly want to use an SQL statement like this:

SELECT * FROM tblExample WHERE (DateTime = Date());

However, that wont work because Date() will only return a short date (DD/MM/YYYY).

View Replies View Related







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