asp-classic

Classic ASP - Trying to search a string in another string variable. (Alternative to InStr function)

喜你入骨 提交于 2019-12-12 04:21:29
问题 In the following code currentregion = 'BC' and Regions = 'ABC' . I am trying to find the currentregion in the Regions and normally it should hit else as the if condition is false . But it returns true as InStr searches part of the string not string vs string. So BC being part of ABC it enters the if loop. Is there a function in Classic ASP that I can compare a string to string but not part of the string like InStr function. RegionSQL = "SELECT * FROM Regions Where Auth <= " & Session("U_Auth"

Age not Returned When Executing Query

十年热恋 提交于 2019-12-12 04:17:59
问题 What could be the problem here when I run the following code as it does not return the age? <% ' calculate age of employee bsql = "select DATEDIFF(yyyy,DateOfBirth,GETDATE()) from employees " set brs = Server.CreateObject("ADODB.Recordset") brs.open bsql, dbconn, 1,2%> <%=rs("DateOfBirth") %> 回答1: As @ar34z has pointed out in the comments; "you are not selecting the column, but are creating a new one" Once you add any computation to a field in a table you are creating what is known as a

Executing stored procedure of SQL in VBScript

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 04:15:52
问题 There is a stored procedure in SQL server which takes four values (2 datetime and 2 varchar ) as input and returns int value as output. This stored Procedure is working fine in SQL Server. In VBScript code of Classic ASP application, I've made some connections and trying to get the int output value of Stored procedure and Print on web page. The below is the code.. dim DD 'This variable stores output of the Stored Procedure date_diff dim CS CS = "Provider=SQLOLEDB.1; Data Source=BLAHBLAH;

asp classic : checking values in an array

℡╲_俬逩灬. 提交于 2019-12-12 04:14:52
问题 I am making a simple questionnaire for a client in Classic ASP. The idea is that there will be 10 questions. The user registers and is being sent to the first question. When this is answered they move on to the 2 nd question etc. Questions can be skipped and returned to at a later date, and each question can only be answered once. I have a comma separated list in the database of each question a user has answered. So, a user logs in and an array is created with the list of answered questions.

AJAX / ASP - Update Progress Panel - Response.Flush

末鹿安然 提交于 2019-12-12 04:08:54
问题 I am currently learning AJAX for the first time, mixed with Classic ASP. I have an AJAX script, that calls my ASP page (process.asp). In the ASP file is a simple loop between 1 and 1000, which is portraying an image process that I have elsewhere in my site, which I would like to add AJAX to later. AJAX SCRIPT function processItems() { var xmlhttp; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange

Send search Pointer to start in MS access

时光怂恿深爱的人放手 提交于 2019-12-12 04:06:45
问题 My code is as follows before copying code here i have writing the problem, when i query some time it shows pincode as query in code mention and some time show not found and now today it is showing blank no result even no error on querying,i thought the problem is when i query the data the pointer is locate on the place of record where it is last queried but not again flush the memory and go to start of database or in program, any one help me how to get rid off code is in asp querying mS

if page is default then include if not default then

橙三吉。 提交于 2019-12-12 04:05:58
问题 I've read similar questions, but none seems working for me. I have an asp site, i think classic (don't even know difference between classic and net), with few pages all with asp extension, and some html includes, one of these being a slider which I want to only display when in homepage (default.asp), and if not default then add a div to the markup. I know the following is wrong, but just to better explain my need. <% if page == default.asp include file="slider.html" if page != default.asp

VB6 Server.CreateObject(“WebClassRuntime.WebClassManager”) fails on Windows Server 2008

旧城冷巷雨未停 提交于 2019-12-12 03:58:34
问题 I'm trying to get a VB6 Webclasses application running a Windows Server 2008 box. I was successful on one, and went to repeat my steps be sure before sending it off to QA and it doesn't work on the second server. I have the application pool set to .NET 2.0 and Enable 32bit = true. ASP and IIS6 Metabase Compatibility are installed on the server. Under my Application > ASP, I set Enable Parent Paths to True. I have copied over and registered the dlls specific to the app, as well as MSWCRUN.dll,

Reorder comma separated sentences into new paragraphs

与世无争的帅哥 提交于 2019-12-12 03:57:13
问题 Above is a database that i am uploading to a hosting server to pull the data off of it to a website using .asp code in a HTML file. The sensors field gets the data using lookup from another table and can contain multiple values but these values are separated using a comma ",". I was wondering if there was a way either within the database or on the .asp page to get rid of the comma and sort them in a new paragraph or replace the "," with "< br/ >" between each of the sentences 回答1: NOTE CHANGE

Share login between PHP and ASP Classic (VBScript)

孤者浪人 提交于 2019-12-12 03:51:48
问题 I'm trying to update/maintain an older web site that was initially written in Classic ASP/VBScript, and later had PHP pages added. I'd like to set it up so that PHP handles the login, but then that logged in state can be shared between PHP and ASP/VBScript. Note that the pages and languages are fairly intermingled -- somebody spending time on the site might come across several different pages in each language, in no particular order. (Eventually I expect it to be completely rewritten in PHP,