FAQ Database Discussion Community


How to convert an integer to a string in ASP Classic

cookies,asp-classic,session-variables
On the home page of my site, I'm creating a session variable like this: Session("doubleCookie") = DateDiff("s", "01/01/1970 00:00:00", now) I then also create a cookie using the same variable. When a user submits a form, I call the session variable and the cookie to make sure they match. If...

how to get array string value using index in classic asp

arrays,vbscript,asp-classic
I need to retrieve one specific value from a list of values stored in an array using an index position value. This is the location reference coming from url parameter: Dim currentorder Dim nextorderindex Dim rowindex Dim iArray Dim i currentorder = Trim(Request.QueryString("order")) rowindex = CINT(Trim(Request.QueryString("rowindex"))) 'e.g. let's say this...

How can I find a node containing a sub-string?

xml,xpath,vbscript,asp-classic
I am able to find nodes in an XML file using the following statement: Set user = objXMLDoc.selectSingleNode("//user[@id = '" & id & "']") But the XML files I'm reading are being generated automatically and sometimes contain spaces after the ID. The id attribute of the user node might look...

How do I reference a classic asp file from an MVC project

asp.net-mvc-4,asp-classic,hybrid
Apologies if this has already been answered elsewhere, I've been searching for an hour and haven't made any traction. I currently have a classic ASP website (not ASP.Net webforms). I wish to implement a new feature using MVC but have it display as part of the website in it's current...

Asp response.redirect not redirecting

javascript,ajax,redirect,asp-classic
I have a Login popup form where I send ajax post request to Login.asp script to prevent go to POST URL after submit. <script> $(function() { $('#contactForm').submit(function(e){ e.preventDefault(); $.ajax({ url:'/ASPLogin/Login.asp', type:'POST', data:$('#contactForm').serialize(), dataType:'text', success: function(response) { var temp = new Array(); temp = response.split("|"); if (temp[0] == 'something') { }...

if then statement not working asp

if-statement,for-loop,asp-classic
I've been trying every combination to make this if then statement work on my ASP page. I've calling fields from 2 access database, then I need to compare both to see if there is a facility that has a report against them. At first I was using the facility name...

How to select a specific array number in a for each loop ASP Classic

arrays,foreach,asp-classic
I am programming a select box in which a user can select from multiple values (up to 72). Im population the select box by using a for each loop to go through the array, like so: For Each item In myArray ItemUur = PadDigits(Hour(item),2) ItemMinuut = PadDigits(Minute(item),2) ItemTotaal = ItemUur...

how to add notification of successfully save to these code

asp-classic
I have done a successful code for adding data however when it successfully save data, there're just nothing notify me whether it done. So could you please help me add a line says something like "You have successfully registered" to display about few secs before it turn back to blank...

What is the '<>' asp operator?

asp-classic
Simple question. I tried searching, by googling for less than and greater than signs doesn't return great results. My guess is that <> is basically equivalent to not equals. So, the below expression would be false if x is null or an empty string, and true otherwise? if x <>...

Syntax error in Update Statement ASP Classic

sql,ms-access,asp-classic,sql-update
I am having the syntax error in my code on a update statement, after reading multiple posts about it I cant figure out what is causing the error. The code is as follows: if request.querystring("do")="customer" then New_customer = request.Form("customer") openconn con sSQL="SELECT RelationNumber FROM Relations WHERE RelationName='" & New_customer &...

Migrating Classic ASP from Windows server 2003 to 2008 R2 [closed]

windows,vbscript,asp-classic
I have been asked to look at the feasibility of migrating an ASP app from Windows 2003 to Windows Server 2008 R2. Old setup: ASP Classic Hosted on: Windows Server 2003 DB: SQL Server 2000 Proposed new setup: ASP Classic Hosted on: Windows Server 2008 R2 IIS: 7 DB: SQL...

What causes “ASP 0248” error?

asp-classic
I get this really bizarre error: 0x80004005 - Object ObjectContext: 006~ASP 0248~Script isn't transacted. This ASP file must be transacted in order to use the ObjectContext object. In some cases. I have old ASP pages that call several libraries, one of which does this: IF blnHasError THEN ObjectContext.SetAbort ELSE ObjectContext.SetComplete...

Request and response to other server in same page using RequestHeader

curl,vbscript,asp-classic,output
How can I show the output from other server in vbscript/ASP after I make a request for value A and B. The situation: my page request to other server value for A and B.. the server response value for A and B.. i want publish the output in same page,...

Chrome and file system objects

file,google-chrome,object,asp-classic,system
I have been doing a lot of research and trying to find a work around for a problem I have. I am working with old code. Classic ASP with VBscript. The tool we have working is file system objects. A user uploads a file into the input and it then...

Javascript redirect not functioning after form submit. Asp Classic, Javascript

javascript,html,asp-classic
Alright, after hours and hours of research and trying things I am completely stuck at the moment. I coded quite a lot for a web page so I'll try to summarize it as good as possible. So I've got this ASP CLASSIC page where a user can create a ticket...

Date Formatting in Classic ASP

asp-classic
I'm writing in Classic ASP for a registration form, and would like to close the registration. I declared the closing date in the variable "closingdate", and have another variable which gets the current date. dim closingdate : closingdate = "5/17/2014" response.write("Closing date: " & closingdate & "<br>") dim currentdate :...

if between 2 hours, straddling midnight

vbscript,asp-classic
I've tried searching the internet for this, but I'm coming up blank. Basically, I has this: If Hour(Now()) >= 8 And Hour(Now()) < 17 then response.write("TEST") This will show the word TEST between 8am and 5pm - but I want it to be able straddle midnight. I want to be...

Error Type: Microsoft VBScript runtime (0x800A01A8) Object required in asp

vbscript,asp-classic
I m new asp.. And tried to access with code But it shows error like this., Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: '' on line 163 The error showed because of this lines, <% do while not getgroups2.eof pkOrgGroups2=getgroups2("pkOrgGroups") ogGroup2=getgroups2("ogGroup") ogLogo2 =getgroups2("ogLogo") %> May i know for which...

Form Data Not Posting While Using URL Rewrite

asp.net,forms,url-rewriting,asp-classic,web-config
OK. Where to start.... I have a website. It is running on an IIS server using classic asp. I have forms on that website. The forms were working fine until I decided to add some url rewrite rules to my web.config file to redirect nice looking urls. After doing that,...

can we create angular js apllication using Simple aspx

c#,asp.net,angularjs,asp-classic,angularjs-scope
Can We create a Angular Js application in ASPX web forms using three tier architecture (Database Layer,Business Layer)?

Classic ASP - Strange Characters Instead of PNG

asp-classic
I'm using http://onlinehelp.tableau.com/current/api/rest_api/en-us/help.htm#REST/rest_api_ref.htm#Query_View_with_a_Preview_Image%3FTocPath%3DAPI%2520Reference%7C_____43 to output some PNG files. The last bit of the code is postResponse = httpRequest.ResponseText Response.ContentType = "image/png" response.BinaryWrite postResponse This results in ÿÿPNG Any advice? I've tried replacing BinaryWrite with just Write and get ï¿¿PNG ...

VBScript Classic: ASP Pool Array from Dictionary, I get type mismatch ('800a000d')

arrays,dictionary,asp-classic
I am storing multidimensional array in a Dictionary, e.g. Dic "myKey", Array(1, 10) so it will be two columns, and 11 rows array. I store it like this: Dic.Add myKey, arrayVariable Then I wish to get back my Array: arrayVariable = Dic("myKey") This line gives the error: Microsoft VBScript runtime...

Issue in parsing XML with Classic ASP (VBscript)

vbscript,asp-classic,xml-parsing
I have the following code, which used to work perfectly, But now for somes reason, doesn't. The XML I am reading is located at: https://forex.boi.org.il/currency.xml The following code should parse the XMl and then save the USD/ILS exchange rate. As I say, it doesnt anymore, and I cant figure out...

More precision needed from SQL Server Money data type

sql,sql-server,asp-classic,sqldatatypes,money
I am working on this old SQL Server database which store numeric values in MONEY datatype. This has been good for years, now for some currency rate conversions we need up to 10 decimal places. We are exploring the possible conversion from MONEY datatype to DECIMAL. I see that a...

ASP Parser Select Specific XML Return Values - FedEx Web Services

xml,asp-classic,fedex-api
I am trying to return only one specific rate set from the FedEx Web Service Rate Reply (XML). The Rate Reply Returns several rate types in multiple sets and I am only currently able to return the first set. This is the current code that grabs the first set of...

Response every quarter between times

asp-classic
I have two dates strFrom = formatDateTime("11:15",4) strTo = formatDateTime("16:30",4) I want to generate a script so that get every quarter from strFrom to StrTo 11:15 11.30 11.45 12.00 12:15 12:30 12:45 13:00 13:15 ... ... ... 16:00 16:30 ...

Creating a Aspx application with Angular Js [closed]

c#,asp.net,angularjs,asp-classic,angularjs-scope
Why we must have to use Web APi or Web services in my aspx web application for using Angular Js Insertion,Deletion,Updation. Is not Possible by creating aspx three tier architectural application (Business Layer and Database Layer)?

Regex to strip span inside a tag using classic ASP

regex,asp-classic
I would like to strip <span> tags and their styles from within <h2> tags eg <h2><span style="font-family: sans-serif;">{text to remain}</span></h2> or <h2><span style="font-family:font-size: 26.3158px;">{text to remain}</span></h2> would become <h2>{text to remain}</h2> Any suggestions of how to achieve this with regex? Ideally in classic ASP (don't ask). Thanks in advance...

SQL Server Native Client 11 ADO connection string for MS SQL Server 2014 with integrated login

sql-server,iis,asp-classic,database-connection,ado
I'm currently trying to migrate a working web solution from an environment on IIS 7.5 and MS SQL Server 2008 R2 (both on Windows Server 2008 R2 x64) to IIS 8.5 and MS SQL Server 2014 (both on Windows Server 2012 R2). I can't quite get my ADODB connectionstring working...

Classic ASP Response write statement

asp-classic
In html these are working, how to I write a code which uses response write statement in classic asp for HTML statement below? <div id="the_div" style="border: 1px solid red"><iframe src=asp3.asp> <br><br></div> <a href="#" onclick="hide('the_div');return false;">Hide the div until this link is click again.</a><br> <a href="#" onclick="remove('the_div');return false;">Remove the div until...

Classic ASP Adding sort function by TD column

javascript,asp-classic
Based on my statement below, how do I sort based on Movie name and date? Basically the user would only clicking the table header, Requirement: I don't want to do in Stored procedure, just a simple click on that header,is this possible and if Yes how should I go about...

Classic ASP & Access DB - FROM Clause Error

ms-access,vbscript,asp-classic
it's the first time I post here and hopefully my english will be understood by everyone, I'm trying to create a site in VBScript (classic ASP) based on MS Access, with CSS and Some Ajax/Jquery. I got to the point of managing logins & sessions, so created a pop-up form...

Classic ASP + Ajax

jquery,ajax,asp-classic
What's wrong with this code? $.ajax({ //url: 'http://ip.jsontest.com/', // url: 'http://ipinfo.io/json', //url: 'http://ip-api.com/json', url: 'http://www.onecert.com.br/json.asp', success: function(data) { alert("OK"); }, error: function(dataerror) { alert("NO"); } }); I create a CLASSIC ASP that create a JSON (verified on online testers). If I tried any other URL on AJAX its works.. but...

How do I take values entered on one html page's form, and enter them on another html page as variables

javascript,html,asp-classic
I have this form on an options page for a website I am working on: <form method="POST" action="process.asp" name="form1"> <table width="70%" border="0" cellspacing="0" cellpadding="0"> <tr> <td>Number of slides:</td> <td colspan="2"><input type="text" name="numberOf"></td> </tr> <tr> <td>Seconds between slides:</td> <td colspan="2"><input type="text" name="secondsBetween"></td> </tr> <tr> <td>&nbsp;</td> <td...

Classic ASP with detecting day/time

datetime,asp-classic
I have the following code below to detect the day and time when the user hits a web page. dim time_hour dim time_min dim day_name dim shouldShowNormal dim showMsg time_hour = Hour(Now()) time_min = Minute(Now()) day_name = LCase(WeekdayName(Weekday(Now()))) shouldShowNormal = true if (day_name = "thursday") then 'Its Thursday so check...

How to download files got from input type=“file” in asp?

asp-classic
I am just a newbie with the asp, but I am creating a website that download images from input type="file". I also want to know how to make a code that makes the targeted folder to be the default location of the downloading file. The location of the folder is...

Using sp_helptext in classic asp

sql-server,stored-procedures,asp-classic
When I want to get the definition of a stored procedure (in SQL Server) I use SQL Server Management Studio. I sometimes run the `sp_helptext' to output the definition of a stored procedure. Link: https://msdn.microsoft.com/en-us/library/ms176112.aspx In a nutshell, I'd like to have a simple html popup window that would output...

Asp3 define Global variable on sessionless

variables,session,vbscript,asp-classic
How can I define a variable that is accessible over several #include levels? E.g. I have some DIM declared in a VBScript and I want to access this by name inside an included VBScript so it is accessible for one user/one session which must be equal to session("UserID") if I...

create hyperlinks within VBscript array with variable output

arrays,vb.net,vbscript,asp-classic
In effort to redeem this question: Updated edit below. <% doMenu dim products dim manu dim website products = Array("E-reader set: Kindle Paperwhite, $119","Leather tote, $160","Earrings, $88","Skin care duo: Moisturizer, $62","Throw pillow, $90","Vitamix 5200, $449","Tea set: Le Creuset kettle, $1oo","Spring nail polish collection, $51","Framed birthstone print, $48","Cotton robe, $25","Jewelry box,...

ActiveX dll not working on IIS 8.5

iis,vbscript,asp-classic,vb6,activex
ActiveX dll not working on IIS 8.5 We have a classic ASP application that uses and ActiveX dll to generate an image on the fly. It was working find on Window 2003 with IIS6. But we're migrating it to Windows 2012 and IIS 8.5. The DLL is registered on the...

Between 2 dates, & detecting todays date (if in between range)

datetime,vbscript,asp-classic
Trying another attempt at this question: With the below code, I'm trying to articulate a date range; May 10 - June 8th. I'm outputting a unique thumbnail image per date in this range (coming together as a stylized calendar of sorts); I need to also detect, within this range, today's...

Classic ASP Post to MS Access DB - Doesen't Work from Textarea Editor

ms-access,asp-classic,tinymce
I use a textarea modifyed with TinyMCE but when I send the form to New.asp which is my "New Post" page, it simply won't upload the content to the server. That is the error... Microsoft Office Access Database Engine error '80040e14' Syntax error (missing operator) in query expression ''&#60;p&#62;-: CLEANED...

ADODB What is the meaning of parameters in CreateParameter

sql-server,asp-classic,adodb
I don't know any ASP, Sql server or ADODB. And this is the first time i am trying to do something with them. I want to add new entries to the database. Current code is like that: set Cmd = Server.CreateObject("ADODB.Command") Cmd.ActiveConnection = Conn Cmd.CommandText = "Make_something" Cmd.prepared = true...

set focus to textbox form element following Validation

javascript,validation,asp-classic,focus
I have a number of fields on a form that I perform Validation on, which I then want to Focus on if the validation fails. The Validation works fine, i.e. rtnStr, but the focus() just won't land on any of the textbox fields, i.e. vCtrl. It remains on the Submit...

Server.ScriptTimeout = 0 Not working

sql,vbscript,asp-classic,timeout,ado
I have an ASP Classic script that has to do a lot of things (admin only) including running a stored proc that takes 4 mins to execute. However even though I have Server.ScriptTimeout = 0 Right at the top of the page it seems to ignore it - 2003 and...

Enable logging for a classic asp site

iis,error-handling,asp-classic
I inherited a classic ASP project and and have deployed it on a IIS 7.5. I am able to access the site, however at certain point I get a generic 500 error page. I want to know what is going on, so I think the best is to see the...

2 queries on single connection? (classic ASP)

sql,asp-classic
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 2 queries. SQL1 doest have any value there...

Can't open Saleslogix SLX connection

vbscript,asp-classic,saleslogix
I can't open a SLX connection with a Classic ASP (VBScript) page: Set connSlx = Server.CreateObject("ADODB.Connection") connSlx.open "Provider=SLXOLEDB.1;Password=pwd;User ID=uid;Initial Catalog=SLXDB;Data Source=192.168.100.1;PORT=1706;" Error: Provider error '80004005' Unspecified error If I open the SLX connection with an ASPX script and return to my Classic ASP page, the connection is working and I...

What does // mean when it is used in a file path? (Classic ASP)

file,asp-classic,path
On this site I have taken over development of, it keeps using file paths for certain images like: /ClassicWeb//pictures/catalogs/world.gif or ..//pictures/catalogs/cintas.jpg It doesn't appear to be an escape character because it is only used for one of the slashes. What does the // (double slash) signify when it is used...

ASP Visual Basic Code Crashing…Help Much Required

oracle,asp-classic
I am trying to insert data into a oracle database The data gets inserted and updates the database, however the page throws an error each time the insert statement finished even though the database was updated? How can i fix this bug? Thanks! <html> <head> <link rel="stylesheet" type="text/css" href="style.css"> <link...

Classic ASP, DATE difference between IIS6 and IIS8

ms-access,iis,asp-classic
I am helping to migrate a classic asp website (front end) and ms access database (back end) from a Windows 2003 IIS6 server to a Windows 2012 IIS 8.5 server. I am having a problem with this query in particular; sqlquery1 = "Select RentalNum, CarID, RentalStatus, StartDate, EndDate from table...

Malicious code hidden in image

image,iis,asp-classic,virus
I've come across a dodgy file upload on our server. It is an image and the MIME TYPE checks out, though on the server it was also uploaded with the extension .asp and .cer. On the surface its a photo some weird chinese symbols and the letters asp, though I...

FormatCurrency giving different results on different pages in different browsers?

vbscript,asp-classic
Given the following VBscript code: FormatCurrency("123",2) written to an html page: <td><%= FormatCurrency("123",2) %></td> Both pages have the same charset "ISO-8859-1", and show the same behavior with charset "UTF-8". I am getting several results across browsers - IE10 and FireFox38 display the following: "Payment Page": £123.00 "Receipt Page": £123.00 while...

How to replace String by Using JScript in Classic ASP

asp-classic,jscript
I try to replace the word "PROCENT" to "%" in an ASP file. But I got error: Error "800a01b6' Object doesn't support this property or method <%@ language="javascript"%> <% var newSpanPosBeschreibung = Request.QueryString("newSpan"); if(newSpanPosBeschreibung.indexOf("PROCENT") >= 0 ){ newSpanPosBeschreibung = newSpanPosBeschreibung.replace(/PROCENT/g, "%"); } //then save the [newSpanPosBeschreibung] into Databank. %> How...

Response.write in multiple place with same recordset

vb.net,vbscript,asp-classic
I have two divs <div class="selection mini"> <select name="selfromYear"> <option selected disabled>From</option> <option>1956</option> <option>1986</option> </select> </div> <div class="selection mini"> <select name="selToYear"> <option selected disabled>To</option> <option>1956</option> <option>1986</option> </select> </div> And I want to fill them with same fields <div class="selection mini"> <select...

How can I correlate session.sessionid and IIS Log session cookie?

asp.net,session,iis,asp-classic,iis-6
We are logging some tracking information to a database table within a classic asp site. One of the pieces of information captured is the users session ID (session.sessionid). Examples of what is captured are: 808592330 14267388 78330403 Then, separately in our IIS logs, session cookies are logged as such (these...

Asp classic 3.0 loop and movenext

loops,asp-classic
I have problem with this Asp Classic 3.0 code. I need send email message when the sql query found in database table the records with : SQL = " SELECT * FROM doTable Where div = 1; " And I have tried this Asp code: SQL = " SELECT *...

Classic ASP why nothing being display on screen?

sql,asp-classic
SQL will return 2 value but when I run on classic ASP page My output return as Date Email Sent Email Date Email Sent Email Anything wrong? What is the correct syntax here? <% 'declare the variables Dim Connection Dim ConnString Dim Recordset Dim SQL 'define the connection string, specify...

Error when leaving input blank in ASP

asp-classic,active-directory
I am developing a script to allow users to write to Active Directory. The problem is that, when I leave a field blank, it results in an error. When, however, I put a value in, even a space, it seems happy. I have the following code: <[email protected]="VBScript"> %> <% if...

Using SQL Parameters in ASP CLASSIC, object improperly defined error

sql-server,parameters,asp-classic
I am trying to protect my INSERT statement from SQL injection using Parameters, but for some reason I am getting the error: Parameter object is improperly defined. Inconsistent or incomplete information was provided... Though, I have no clue what is causing it. My SQL statement is as follows: Set spSQL...

AJAX code with classic ASP is broken on new IIS 7.5, SQL Server 2008 R2 settings

ajax,sql-server-2008,asp-classic,iis-7.5
Recently got a new machine to setup and run previously working code with classic ASP, on IIS 7.5 with SQL Server 2008 R2 on a 64-bit Windows 7 Enterprize (local development environment). Local regional settings : American. Problem: Identical code works on old machine but all the AJAX code is...

How to implement Google Recaptcha 2.0 in ASP Classic?

asp-classic
I need help to implement the answer Google Recaptcha 2.0. I've tried a few ways to recover the response after sending the form but not consigui get the answer True. Follows the example I'm trying: recaptcha_secret = "example45454sasa" sendstring = _ "https://www.google.com/recaptcha/api/siteverify?" & _ "secret=" & recaptcha_secret & _ "&response="...

Publish will not push adovbs.inc to target File System destination (classic asp and IIS 7.5)

iis,asp-classic,iis-7.5,publish,server-side-includes
I have a classic ASP site on my Visual Studio 2012 development machine and I have noticed a strange behavior with Publish. A file called adovbs.inc exists in a folder called debug within the root of the site. Quite a few files on the (development) site reference this without problem...

Prevent Caching of PDFs in ASP Classic

pdf,caching,asp-classic
I just started to manage a website for the company I work for and it is still running with ASP Classic so I have had to learn quite a bit. Recently our managment has started to post a dynamically updated PDF to the website every few hours. The problem I...

change the below to parameterized query With conditions

mysql,sql,.net,vb.net,asp-classic
How to change the below to parameterized query which has if-conditions...?I want to make it to parameterised query qith command object... strQry="SELECT distinct EnrolID" &_ " FROM " & strview & " WHERE ProgramID=" &vP&_ " AND EnrolStatus = 'ZZY' AND CampusID=" &vC if vW <> "" THEN strQry=strQry +...

How to execute POST using CURL

post,curl,asp-classic
How to execute POST using CURL, i have this basic .asp that receives the data via POST and show the result in .JSON format. <[email protected]="VBSCRIPT" CODEPAGE="65001"%> <% Response.ContentType = "application/json" Response.Write("{ ""responseCode"": " + Request("responseCode") + ", ""publication_id"": " + Request("publication_id") + ", ""version"": " + Request("version") + "}") %>...

Adding string to an attribute that is generated dynamically with jquery

jquery,asp-classic
I need to add a string to a specific part of a dynamically generated href depending on screen size. This is what I got $(document).ready(function () { var strSC; $("[href*='sc=']").each(function () { strSC = $(this).attr("href"); if ($(window).width() < 767) { $(this).attr("href", strSC + "m"); } else if ($(window).width() <= 992)...

Classic ASP Vbscript Conditional Statement for Time() not giving correct results

time,vbscript,asp-classic,condition
im working on a simple Conditional statement in vbscript to check whether a time is earlier than another time. and its not working or making any sense. just using dates seem to work but i need to use time... which isnt working. dim startDateStartTime, CurrentDateCurrentTime startDateStartTime = FormatDateTime("12:00:00 PM") response.Write("The...

Asp-classic Vbscript webpage language switcher into variable

vbscript,asp-classic
For example i have language switcher in index.asp <ul class="drop-lang_menu"> <li id="LanguageSelected"><img src="img/icons/flags/ru.png" /><a href="#">Rus</a> <ul> <li><img src="img/icons/flags/ru.png" /><a href="#">Rus</a></li> <li><img src="img/icons/flags/lt.png" /><a href="#">Lit</a></li> <li><img src="img/icons/flags/us.png" /><a href="#">Eng</a></li> </ul> </li> </ul> and also in...

Microsoft.XMLDOM - Facebook Page RSS - System error: -2147012866

xml,facebook,asp-classic,rss
I had successfully hooked up my Classic ASP site to read a Facebook page RSS feed and return details on the latest post. This had been working perfectly fine when set up, but I noticed the other day that it no longer worked. I've fiddled with it quite a bit,...

Insert Server Date to DB ODBC Error

asp-classic
I'm having a little bit of trouble trying to insert the server date into a DB through the Parameters call, my code for this action is listed below: <% If (CStr(Request("MM_insert")) = "Modal-Menu-AddNote-Form") Then If (Not MM_InsertEdit) Then ' execute the insert Dim MM_InsertCmd Set MM_InsertCmd = Server.CreateObject ("ADODB.Command") MM_InsertCmd.ActiveConnection...

Why is my RecordCount always -1?

asp-classic
I want to run a SQL query to just see if data of an ID is already in the database. I used this answer to achieve that. But it doesn't work. The database does have rows and when I run the exact SQL queries, it shows me several results. But...

Read POSTed Binary File And Write To a New Binary File

excel,vbscript,asp-classic
I'm creating a web page that will allow user to upload files to the server. I was able to save the file on the server, but I notice that the office files (e.g. word, excel) are corrupted and can not be opened. My UI is fairly simple <form method="post" enctype="multipart/form-data"...

Javascript Ajax Call always returns readyState=1 and status=0 error

javascript,html,ajax,asp-classic
I am designing a small project that utilizes a geocoder and parses the address, lat, and long into variables, which sends the values to a database using AJAX/ASP and inserts the values. My issue surrounds the readyState and status of the AJAX call, which always returns 1 and 0 respectively....

Search returns line number

asp-classic
Im trying to search for something in a textfile and have the line number returned. I have tried getting the line number by using instr but that timed out the script. <% Const ForReading = 1 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.OpenTextFile(Server.MapPath("evewhdb.txt"), 1) FSOContents = objTextFile.readline SResult =...

LIKE operator in SQL for my Access Database returns no values in ASP CLASSIC while it does if the query gets copied directly in Access

sql,ms-access,asp-classic,sql-like
So as the title says, I'm trying to run a query in my ASP Classic page but for some reason it doesn't return a record set while it does returns a record set it if the query is copied directly in Access. There is one thing where it probably goes...

asp classic replace
in section of output BBCode

replace,asp-classic,bbcode
I have create a demo file, that you can download, and a page to see it running. What I need to have done, is that all the tags, need to be removed ONLY in the area (BBCode [code]) UPDATE: The code does not work with multiple BBCode tags. So if...

Will a long running .net process be termintated if the user session is terminated?

c#,session,asp-classic,.net-4.5
I have a ASP C# application that allows users to upload and process text files. after the upload, the parser is called and starts its work. depending on the size and quantity of the files the user uploads, this process can run for up to 20 hours. If my users...

Convert XML tag to specific format

vbscript,asp-classic
I have one ASP file, which I have to read. After reading the ASP file I have to convert some XML format to some specific format. Below is my code: <% dim sbixml, html, oHtml, xml, xml_, http, api <sbixml> <NetSightMessage> <Header> <UserID>GARY</UserID> <Connection>Production</Connection> <CurrentLedgers GL="GL" JL="JL"/> <Mask>POUPPR</Mask> <SubSystem>Purchasing</SubSystem> <Trace...

Print HTML with IF Statement

html,asp-classic
I'm traducing a small PHP script to clasic ASP, but I don't know how can I do this in ASP <?php if ($anyCondition == true): ?> <p>This is a HTML paragraph, it will be printed if $anyCondition will be true</p> <?php else: ?> <p>This is another HTML paragraph, it will...

Trapping Object required: '[object]' with MSXML2.ServerXMLHTTP.6.0

xml,asp-classic
I am using the Flickr API and MSXML2.ServerXMLHTTP.6.0 to read the XML response. For example: https://www.flickr.com/services/rest/?method=flickr.photos.search&api_key=[mykey]&text=cheese&per_page=1&sort=relevance&min_upload_date=2010-05-25 Returns: <rsp stat="ok"> <photos page="1" pages="847622" perpage="1" total="847622"> <photo id="8658999887" owner="[email protected]" secret="13e2615193" server="8123" farm="9" title="cheeses" ispublic="1" isfriend="0" isfamily="0"/> </photos>...

aClassic ASP : How to locate an specific order in array, or record-set. Then move Next or Previous, starting from that order

arrays,vbscript,asp-classic,ado,recordset
I have done a bit of work on my code, and still unsure about how some of the code needs to be done in order to work. So far I got a function named FunctionUp' coded, this is the code that will go in the following sequence: If array of...

Entering an if statement, but it shouldn't / entering false if statement

vbscript,asp-classic
This is in vbscript on an .asp page. number1 = GETFIELDSFROMSQL(sqlRequest, "MaxLoan") response.write "number1: " & number1 response.write "number2: " & Session("number2") If number1 > Session("number2") Then response.write "TESTTTTTTTT entered the if statement!" number1 = Session("number2") End If number 1 prints to the screen as 10000 number 2 prints to...

ASP Classic session string is canceling concatenation

string,vbscript,asp-classic
I have come across a puzzler regarding string behavior in ASP classic. The code pulls in some values from session and then attempts to use those as strings. The problem is that the value is somehow canceling string concatenation. Dim testVar testVar = session("test") <- this value is "aaa" response.write...

ASP Server.Execute - Executed Page is not accessing variables from the former/first page

asp-classic
I already know that Server.Execute(..) does not accept query strings. The MSDN website says that all variables from the former website are avaible to the executed page. However it does not work for me at all. Any idea why? Simple example that should work but it does not: <% Dim...

Update form on page when item selected from drop down menu

html,asp-classic
I have the following code; <[email protected]="VBSCRIPT" CODEPAGE="65001"%> <!--#include file="Connections/betatrak_db.asp" --> <% Dim RS_Betatrak__MMColParam RS_Betatrak__MMColParam = "1" If (Request.Form("RL") <> "") Then RS_Betatrak__MMColParam = Request.Form("RL") End If %> <% Dim RS_Betatrak Dim RS_Betatrak_cmd Dim RS_Betatrak_numRows Set RS_Betatrak_cmd = Server.CreateObject ("ADODB.Command") RS_Betatrak_cmd.ActiveConnection = MM_betatrak_db_STRING RS_Betatrak_cmd.CommandText = "SELECT * FROM Betatrak_Length WHERE ID...

Mail function in ASP CLASSIC sends literally html tags in the body

html,email,asp-classic
A few weeks ago I implemented a mail function in my ASP Classic code but it generates a few strange markup / styling errors. When a mail is send with the Mail function it sometimes outputs html tags literally while the syntax is correct. See picture below for the literal...

How to send a different email to CC and TO without creating 2 mail objects? ASP CLASSIC

email,asp-classic
I was wondering if it is possible to send a different paragraph in the mail body to the CC that isn't being send to the TO address? I rather not send 2 emails to the CC address and TO address since the email differs only in a small part, namely...

Best way to deploy classic asp webapp with sqlite database?

sqlite,asp-classic,hosting
I have a classic ASP front end which serves to collaboratively enter data into a sqlite database, meant to be used later in an android app. I need to deploy this ASP webapp onto an online server with sqlite odbc installed, because the only other option I know is to...

VBScript Redirect to Network Folder

vbscript,asp-classic
I have taken over a web page recently I have some programming knowledge and can usually muddle my way through things but I cant seem to get it today. There is a snippet of code on the website that opens a folder on a network drive when a user opens...

Get special character from Query string in classic asp

url,asp-classic
I have an URL like ViewProfile.asp?mem_id=phani#1&page=1 I am trying to get the value of mem_id by using request.Querystring("mem_id"), I am getting only phani. The part #1 of it is not coming to the variable. I have used HttpUtility.UrlDecode() and Server.UrlDecode(). I am not sure whether these are there. Can someone...

Cannot retain the data of old Text-boxes on dynamic addition of others

javascript,html,dom,asp-classic
Hello Guys i was trying dynamic addition of text box and other controls in Classic ASP through JavaScript but encountered some problem up there. Though i was able to add new textboxes but was no able to retain their data. Eg : If i have a button and on click...

Locating the source DLL behind a COM+ ProgId

asp-classic,com+
I've never really had to debug Classic ASP, so this is a little rough and most likely a poor question, but I have done as much research as I could before asking. I have a request to identify what code prints to a printer, and re-use that code in a...

Calling Up A Correct, Individual, Modal Menu from a Classic .ASP Repeat Region

javascript,jquery,asp-classic
I have a note section in my form that allows users with permissions to add information to a particular record. Part of this not section must allow users to delete their own notes or to edit their own. The issue I seem to be having is when I add a...

Why does this function not work?

mysql,function,date,asp-classic
Any idea why this doesn't work? function func_data(datdb) dat=(Year(datdb) &"-"& Month(datdb) &"-"& Day(datdb)) hor=(hour(datdb) &":"& Minute(datdb) &":"& second(datdb)) varr = dat&" "&hor end function data_pt = date data_mysql = func_data(CDate((now))) dia_semana = WeekDayName(WeekDay(Now())) mes = MonthName(Month(Now())) hora = time dataehora = now response.write "<br>data_pt:"&data_pt response.write "<br>data_mysql:"&data_mysql response.write...

Get the value from a single line XML response

javascript,xml,asp-classic,response
I have the result of a web service call returned to my application. I need to get the result of the generated pdf name. Can anyone suggest a method of doing this in Classic Asp or Javascript. I've tried various methods of trying to get the value using xPath etc....

List most recent files in ASP Classic

sorting,vbscript,asp-classic,file-management
I am redesigning our department website and our IT department does not support the intranet development. The server runs ASP Classic and is able to run VB scripts and Javascript to an extent (somethings work others don't). So here is my problem: I modified a simple code that I got...

.asp honeypot for contact form

asp-classic,webforms,honeypot
I'm caught in a hard place where I am being forced to use ASP classic on some web forms. I don't want to get spammed, but I am unaware of how to create a honeypot with .asp classic. Is this possible or will I have to use a captcha field?...

point to virtual directory in IIS

asp-classic,iis-7.5
I apologize if I am not using the right technical terminology, but I am trying to be as clear as possible, I hope my post makes sense. I have added a local classic ASP website in IIS 7.5 Sites csr < website The physical files location: c:\projects\webapps\csr The URL in...

Classic ASP and JQuery reloads default.asp page on redirect

javascript,jquery,vbscript,asp-classic
I have integrated an existing Classic ASP site with JQuery (they were using VBScript before). The previous version works fine but the script's needed to be updated so it will work on other browsers. But when I redirect the page with JQuery integrated, the system loads the default.asp file and...