We help IT Professionals succeed at work.






Active Server Pages (ASP) is Microsoft’s first server-side engine for dynamic web pages. ASP’s support of the Component Object Model (COM) enables it to access and use compiled libraries such as DLLs. It has been superseded by ASP.NET, but will be supported by Internet Information Services (IIS) through at least 2022.

I have a website that uses classical ASP. I am using localhost, and originally the pages were developed using MS Visual InterDev - ASP 3.0
I wanted to look at some of the coding in a page and the original coding is gone and in it's place is all these vti_ statements..
Can someone tell me what has happened and how to fix it ??
Here's an example below:

vti_timelastmodified:TR|16 Dec 2003 14:39:42 -0000

Open in new window

Hello All:

I have a classic web forms asp (vb) web application that I am working with.  I have one page that I would like to embed a value from my web.config's app.settings.  this page references an external js file.  What I am ultimately trying to do is pass the value from app.settings to the js file on an onclick event.  The app.settings key holds the value of the current server, so I have transforms set to update the web.config with the correct server name when the application runs.

So in my app.settings I have:
<add key="CurrentServer" value="ProductionServer"/>

What I was trying to do was something like this:
<input type="hidden" id ="CurrentServer" value="<%$ AppSettings: CurrentServer %>" />

My reasoning behind this approach is then in the external file, I could target this input by doing something like:

let currentServer = document.getElementById('CurrentServer').value

When I run the page, I receive the following error:
Literal expressions like '<%$ AppSettings: CurrentServer %>' are not allowed. Use <asp:Literal runat="server" Text="<%$ AppSettings: CurrentServer%>" /> instead.

Can someone please steer me in the right direction?  Would a server control be more appropriate?  If so, how would I interrogate the rendered control using JavaScript once the onclick even is fired that triggers the javascript code?

Many thanks for any assistance!

I'm trying to call a MySQL stored procedure and read its out parameter using ASP classic. Unfortunately I get the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[MySQL][ODBC 3.51 Driver][mysqld-5.5.5-10.3.17-MariaDB]OUT or INOUT argument 2 for routine baseline.Proc_Test is not a variable or NEW pseudo-variable in BEFORE trigger
/functions/command_procedure.asp, line 54

The stored procedure is defined here:

CREATE PROCEDURE Proc_Test (IN  Lang_param  VARCHAR(10),
                            OUT ID_param    int)
   SET ID_param = 99;
END //

CALL Proc_Test ('eS', @myID);

Open in new window

Here is the ASP classic script calling the stored procedure:

<%@ Language=VBScript %>
    Option Explicit
    Response.Buffer = True
    Dim Hostname, Username, Password, Database
    Hostname = "localhost"
    Username = "baseline-user"
    Password = "xxxxxx"
    Database = "baseline"

<title>Baseline Connection</title>
<style type="text/css">body {font: normal 11px Arial}</style>


   Const adCmdStoredProc = 4
   Const adParamInput = 1
   Const adParamOutput = 2
   Const adInteger = 3
   Const adVarChar = 200

   Dim Command
   Dim Connection
   Dim ConnectionString

   Dim myLang
   Dim myID

   Set Connection = Server.CreateObject("ADODB.Connection")
   ConnectionString = _
     "DRIVER={MySQL ODBC 3.51 Driver};" & _
     "SERVER=" & Hostname & ";" & _

Open in new window

I'm having a problem using OUT parameters in a stored procedure call, IN parameters work just fine but OUT parameters cause a server '500 Internal Server Error message'

My setup is below, any advice appreciated

   Set Conn=Server.CreateObject("ADODB.CONNECTION")
   Set RS = Server.CreateObject("ADODB.RecordSet")
   Conn.Open "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=" & Hostname & "; Database=" & Database & "; UID=" & Username & ";PASSWORD=" & Password & "; OPTION=3;"
   strSQL = "Create_Dummy ('eS', @mySuccess, @myStatusCode, @myID)"
   Set RS = Conn.Execute(strSQL)
   If RS.BOF And RS.EOF Then
      Response.Write "The connection to the Baseline is successful but unfortunately no record found in the database."
   End If
I am using an AjaxControlToolkit ComboBox in a C# web application. My Webform page will not display the contents of the dropdown list added in code behind. This works when I have a master page. However I need to remove the m,aster page from the project and this results is the dropdown list not displaying. Appreciate if someone can explain how I can get the dropdown list working without the master page.


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="TiosClient.WebForm3" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <form id="form1" runat="server">
            <asp:Button ID="Button1" runat="server" Text="Button" />
        <asp:Button ID="Button2" runat="server" Text="Button" />
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
        <ajaxToolkit:ComboBox ID="ComboBox1" runat="server">

         <div >
           <p><ajaxToolkit:ComboBox ID="ComboBox2" runat="server">

         <asp:ScriptManager ID="ScriptManager1" runat="server">


Open in new window

using System;

Open in new window

Hi there.

I use some javascript to create an email from clicking an icon. The script is like this:

function clickemailuhk() {
	username = "uhk";
	hostname = "xxxxx.dk";
var linktext = username + "@" + hostname ;
    var link = "mailto:" + linktext + "&subject=" + escape("XXXXXX website...");
    window.location.href = link;

Open in new window

And it is activated with this:

<img src="images/Mail_icon_mini.png" width="26" height="26" title="Click to send email" onClick="clickemailuhk()">

Open in new window

It used to work fine, but now it creates an email with this in the "To" field:

uhk@xxxxx.dk&subject=AgeCare website...

It used to place the subject in the subject-field in an email.
I use Outlook. What happened lately, and how can I correct it to work as intended?

Best regards

Hello, all.

OK, working with SQL Server 2019, and it works wonderfully with accented characters.
Dvořák Hall
It displays to the page just fine.
However, when I try to read from a URL QueryString, it's not working.
I get
Instead of the full name.

I have at the top of my main page.
Response.ContentType = "text/html"
Response.CodePage = 65001
Response.CharSet = "UTF-8"

Open in new window

But it still will not get the URL: /Page/Dvořák_Hall
And display it correctly to the page, to use against the database query.

Any suggestions?
how do I load an old asp program to VS and run it with debug?
Hello, All.

I am trying my best to NOT have to encode the apostrophe in a URL name to this: Nothin%27_to_Lose.
I have tried to replace the apostrophe with a * or a Period, and when I do a Request.QueryString("Title") on this
It is replaced with

What am I missing here?
Does the Request.QueryString() not work with these types of characters?

I have an asp net page with separate VB code behind page.
The aspx page is about 2000 px long. There are is a top, middle, and lower sections.
I need to be able to jump to each section based on various events in my code behind.
I was thinking of putting a heading label for each section.  I would like a command that I could insert as needed in my code behind to jump to specific labels. It will need to work across desktop and mobile platforms.
I'm moving an application from a dedicated Windows Server / IIS to Azure with SQL Database and App Service.  The existing application runs on MS Access "server" with Classic ASP pages and it is pretty speedy.

The following query on existing server for example returns all records in about 3 seconds.  There are 36,720 records in the "loads" table.

Now that I've moved the DB to Azure SQL the records are returned in about 35 seconds to the Azure App.  My current Azure config is Serverless Gen5, 2-8 vCores, 6GB-24GB memory.  After increasing the compute power I noticed the results returned faster, so I suspected poor query design.

Question:  Can the following query be optimized further?  I expected much better performance on SQL Server vs. MS Access "Server"

SELECT        dbo.loads.ID, dbo.loads.CustomerID, dbo.loads.CustomerContactID, dbo.loads.RequestDate, dbo.loads.Equipment, dbo.loads.Commodity, dbo.loads.Stops, dbo.loads.Miles, dbo.loads.CommentsPublic, dbo.loads.GrossQuoted,
                         dbo.loads.Weight, dbo.loads.Length, dbo.loads.Width, dbo.loads.Height, dbo.loads.CargoValue, dbo.loads.CommentsPrivate, dbo.loads.UserID, dbo.loads.Created, dbo.loads.forfeitload, dbo.loads.voidload, dbo.loads.shipperid,
                         dbo.loads.shippercontactid, dbo.loads.shippercomments, dbo.loads.consigneeid, dbo.loads.consigneecontactid, dbo.loads.consigneecomments, dbo.loads.usforwarderid, dbo.loads.usforwardercontactid,
Hello All;

In the following statement, I need to know how to place the ? for the parameterized Query.
The part we are looking at is
 (CHARINDEX('/?/', '/' + Tracks.LID) > 0)
When run in SSMS, this is the way it will look
 (CHARINDEX('/1/', '/' + Tracks.LID) > 0)
(Replacing the ? with a number)

sqlctLabel.commandtext="SELECT COUNT(DISTINCT Tracks.AlbumID) AS Albums FROM Tracks INNER JOIN Albums ON Tracks.AlbumID = Albums.AlbumID INNER JOIN Artists ON Albums.ArtistID = Artists.ArtistID WHERE (CHARINDEX('/?/', '/' + Tracks.LID) > 0) GROUP BY Artists.ArtistName, Artists.ArtistID"
sqlctLabel.Parameters.Append sqlctLabel.CreateParameter("@LID", adInteger, adParamInput, , strLabelID)

Open in new window

I am new to AWS. I have done a great deal of background reading/research which always helps when you are trying to resolve a problem.
That being said, I have a problem which I do not understand.
We have an ASP legacy system which will remain in ASP indefinitely.
We have stored pdfs with images – S3 in the AWS cloud.
The images and pdfs are “public”.
Part of the URL is dynamically constructed each time based on the “user” that logins (tagged onto the AWS info) We have a newer system – codeigniter/php –  which will display the pdfs and image just fine with the dynamically created URL.
But will not do so in our ASP legacy system.
I understand that by the simple use of a URL, I should be able to access the pdf etc., and particularly since the pdfs and images are “public”.
I develop using localhost, (PHP-Wampserver) but can also develop ASP.
SO my question is two fold.
Do we need to install a something on our ASP server to enable us to view the images as well??  
And what SDK must I install on my localhost (I am thinking the JavaScript and PHP)
I thought maybe it might be a security/permission issue with the ASP server accessing the cloud but that doesn’t make sense because on the ASP side, it will display the pdf but not the image.
This is becoming urgent and any help/advice/pointers would really be appreciated. Thank you.
Ok I know this sounds bizarre but I have a web page that I access on my phone.  It has a "submit" button that I need to be very sensitive to the touch, so that the instant I press it, it responds.  Sometimes I have to do it multiple times to get it to submit.  I assume an app would be better but for now my only option is a web page.  Is there any way that I can make this a more "responsive to pressing" submit button than it is now?  It is big enough that it is hard to miss.

Thank you!
I am a little inexperienced with console error messages.  How can I resolve "You have 3 errors on your page  uncaught SyntaxError: Unexpected token '<'" on this page: https://www.gopherstateevents.com/results/cc_rslts/relay_rslts.asp?meet_id=637&race_id=3175

Thank you!
Our ASP VBscript programs that send out an email (like from a contact form) have worked perfectly for years. Suddenly, the .Send function is generating an error 80040211.

Again, nothing to our knowledge has changed.

Is there a way to see what the specific error may be?
Can someone please help me to understand why I am getting this error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid column name 'Lab@xyz.org'.

/trainingSessions/SQLRuns2.asp, line 58

 strSQL3 = "UPDATE _Employees SET Pager = e.LName + ""Lab@xyz.org"" FROM _Employees e INNER JOIN _Department d ON e.reportsto = d.DeptHead WHERE e.isactive = 1 AND e.isScientific= 1 AND e.reportsto = " & Session("strPIID")                                        
 set rsEMP = oConn.Execute(strSQL3)

This is the result in SQL Server Profiler:

UPDATE _Employees SET Pager = e.LName +  "Lab@xyz.org" FROM _Employees e INNER JOIN _Department d ON e.reportsto = d.DeptHead WHERE e.isactive = 1 AND e.isScientific= 1 AND e.reportsto = 7165
I use data tables to display results of races that we time on a classic asp website (https://www.gopherstateevents.com/results/fitness_events/results.asp?event_type=5&event_id=883&race_id=1516).  This weekend the results of one of our bigger races showed a Data Table error until I figured out that one person's name was incorrectly entered, with a "/" inserted (ie: Johns/on).  There were no issues in the way the results were calculated and displayed everywhere except in our data tables.

Here is my question:  Are there other characters that will prevent JQuery data tables rendering?  Also, should I build some error trapping in to prevent these characters (ie: Replace(FirstName, "/", "").  Seems like a lot of processing for something that is so unlikely to happen?

Thanks in advance.
I am trying to send race results to race finishers in classic asp and my script keeps timing out.  I have my Server.ScriptTimeOut set plenty high.  (note that I just added the xmlhttp.SetTimeOuts)  Not sure if I have the other timeout set correctly.  Can someone look at the following code and let me know what changes might help please?  Thans!

Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
    .Item(cdoSendUsingMethod) = cdoSendUsingPort
    .Item(cdoSMTPServer) = "smtp.mandrillapp.com"
    .Item(cdoSMTPAuthenticate) = 1
    .Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 587
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
    .Item(cdoSendUsername) = "username"
    .Item(cdoSendPassword) = "pwd"
End With

    bSentBCC = False

	For j = 0 To UBound(SendTo) - 1
		'get email address
		sMyEmail = vbNullString
		If DontSend(SendTo(j)) = False Then sMyEmail = SendTo(j)

		If Not sMyEmail = vbNullString Then
			If ValidEmail(sMyEmail) = True Then
                sPageToSend = "http://www.gopherstateevents.com/misc/pix-vids_notif.asp?event_id=" & lEventID 

                Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
	                xmlhttp.open "GET", sPageToSend, false
                    xmlHttp.SetTimeouts 0, 60000, 300000, 300000
	                xmlhttp.send ""
	                EmailContents = xmlhttp.responseText

Open in new window

Hi there, I was trying to work out the length of a Request.QueryString

I have been looking around, however I can only find this, which doesnt give me the result I like:


Open in new window

This gives a value of 6 or what ever the length the text is...

What I would like is...

http://domain.com/?i=AUGPA <- the bold part, how can I determine the length of this?
Hi there, I have just migrated across to a 2016 Server and having some issues running a site, have no idea why this is happening, as I can see the settings are the same in IIS

ADODB.Connection error '800a0e7a'

Provider cannot be found. It may not be properly installed.

oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("core/allcore.mdb")

Open in new window

Any help would be amazing!
I need to tap into the Session_OnEnd event in the session object. and call a stored procedure in MS SQL

My site is built in ASP Classic I want to perform a database clean up when the users session ends or they log out

the logout is handled, but i need a way to cover the user just leaving the site without logging out..

Can anyone help me with this please..
I have developed a web application that i want to make available for people to try out and have a look at.

in my mind i see it loading the database into a session, so the user can log in, try things out test what they want to do make changes to the data that doesnt get saved back to the original data base, and when they log out or the session expires the dummy database no longer exists,.

i am using ms sql 2017, asp classic on a windows server

is what i want to do possible, and how would i start

thank you
this was working, i change the call to the database to use the Parameters element of ADO as just passing the values failed when passing HTML to database..

i have obviously done something wrong but been looking at this now for 4 days and not got any closer to a solution..

your help would be a god send
Thank you

DIM cmd, DbStr
DbStr = "User ID=xxxx;Password=xxxx;Initial Catalog=CMMS;Data Source=MYCMMS;Provider=SQLOLEDB"

Set cmd = Server.CreateObject("ADODB.Command")
set cmd.ActiveConnection=DbStr

'Prepare the stored procedure
        cmd.CommandText = "ConfUpdate"
        cmd.CommandType = adCmdStoredProc
	cmd.Parameters("@Company") = MyCompany
	cmd.Parameters("@address1") = Myaddress1
	cmd.Parameters("@address2") = Myaddress2
	cmd.Parameters("@city") = Mycity
	cmd.Parameters("@county") = Mycounty
	cmd.Parameters("@postcode") = Mypostcode
	cmd.Parameters("@phone") = Myphone
	cmd.Parameters("@WorkorderEmailTPL") = MyWorkorderEmailTPL
	cmd.Parameters("@VendorEmailtpl") = MyVendorEmailtpl
	cmd.Parameters("@InstanceID") = MyInstanceID
	cmd.Parameters("@VersionNo") = MyVersionNo
	cmd.Parameters("@updatedBy") = MyupdatedBy
	cmd.Parameters("@IssueDate") = MyIssueDate
	cmd.Parameters("@IssuedBy") = MyIssuedBy
	cmd.Parameters("@LiveDate") = MyLiveDate
	cmd.Parameters("@emailfooter") = Myemailfooter
	cmd.Parameters("@emailDisclaimer") = MyemailDisclaimer
	cmd.Parameters("@action") = Myaction
	cmd.Parameters("@confID") = MyconfID


Open in new window

I run the code below thru PhoneGap, but I've found out that the Asp on server computer ignored the request. Here, I would like to know if the PhoneGap has a capacity to allow the server accept the request from the clients via phonegap apps? The code below is working if i used iis. Any help please.. Thanks!

    function GetSerialDrive()
    	if (window.XMLHttpRequest)
    	  {// code for IE7+, Firefox, Chrome, Opera, Safari
    	  xmlhttp = new XMLHttpRequest();
    	  {// code for IE6, IE5
    	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    	  if (this.readyState==4 && this.status==200)
    		xmlhttp.open("GET","MyDrive.asp?a=" + "x", true);

Open in new window


Server side
dim fs,d
set fs=Server.CreateObject("Scripting.FileSystemObject")
set d=fs.GetDrive("c:")
   response.write("The serialnumber is " & d.SerialNumber)
set d=nothing
set fs=nothing

Open in new window







Active Server Pages (ASP) is Microsoft’s first server-side engine for dynamic web pages. ASP’s support of the Component Object Model (COM) enables it to access and use compiled libraries such as DLLs. It has been superseded by ASP.NET, but will be supported by Internet Information Services (IIS) through at least 2022.