[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

ASP

81K

Solutions

31K

Contributors

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.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hello All;

I have a table where the column is a varchar.
(If it needs to change to an INT or Date, please let me know and I will do so.
It is not too late to make that change.)
In the column named = Years
It has the following example.

1978
1965
1985
2017
1962
1998
2012
2002
1958
1978

OK, What I need to do is the following.
For the years in the table, they need to output as

1950
1960
1970
1980
1990
2000
2010
etc...

Thanks.
Wayne
0
Exploring SharePoint 2016
LVL 12
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

Hello, All;

For SQL Server 2016.
I used to have this code lying around somewhere, but I am unable to find it.
OK.

table (SomeNames)
Johnny
Carr
Wayne
Ronda
Valerie
Tanya
Joey
Vin
Ron
Tony

OK, in the above, I would like to have a list of the Alphabets
Since there is NOT the whole list of letters to comprise the entire Alphabet, it would only show the letters for the names that are available.
For the example above, would be.


C
J
R
T
V
W

Once there are more names added which contain the other letters in the alphabet, then it will then display them letters.
And what I am going to do, is have each letter as a hyperlink on the page, to display all the names for that letter.

Hope this is clear.
I wish I knew where the code was at that I once have.
It is probably buried in a project script, of which I do not remember the name I gave it.
As it was about 5+ years ago, that I remember using it last, as it was at my old home.

Thanks all;
Wayne
0
Hi Experts,
On my classic ASP page I'm displaying a record like this:
<%=rs("UserID")%>

UserID always has to be 6 characters, e.g. 123456
When it's less than 6 characters I would like to display zeroes in front of it, e.g. when UserID is 23456 I would like to display it as 023456
Thank you for your help
0
Can someone help me identify what is wrong with my JQuery/Bootstrap?  On my main page (https://www.gopherstateevents.com/) the top dropdown works well...designed to work on mouse over.  This is a page created in Mobirise.  I tried to re-create the rest of my pages (using classic ASP) but the nav bar has to be clicked to function.  Here is an example:  https://www.gopherstateevents.com/results/cc_rslts/cc_rslts.asp?sport=cc

Obviously something is either mis-placed or missing altogether.  Any help would be much appreciated!
0
I need to be able to separate child nodes and apply logic

my XML Source: https://vpic.nhtsa.dot.gov/api/vehicles/decodevin/ZPBUA1ZLXKLA00941?format=xml

For some reason the text values are concatenating but I want them to be broken out by the Node name and value.  I put notes in the code.  The Code DOES work just not how I need it.

  
<%

url = "https://vpic.nhtsa.dot.gov/api/vehicles/decodevin/ZPBUA1ZLXKLA00941?format=xml"
     
     ' add a BASE HREF tag
     Dim xmldoc
     dim xmlhttp 
      
     Response.write "<BASE HREF='" & url & "'><P>" & url  & "<P>"
    
     
     set xmlhttp = CreateObject("Microsoft.XMLHTTP")
     Set xmlDoc = CreateObject("Microsoft.XMLDOM") 
     xmlhttp.open "GET", url, false 
     xmlhttp.send ""
          'response.write xmlhttp.responsetext
          
          xmlDoc.async = False
          bresult=xmlDoc.loadxml(xmlhttp.responsetext)
       
       State = ""
        ' WORKS ...Set NodeList = xmlDoc.getElementsByTagName("*")
        'Set NodeList = xmlDoc.documentElement.selectNodes("/Response/*")
        'Set NodeList = xmlDoc.documentElement.selectNodes("/Response/Results/*")
   Set NodeList = xmlDoc.documentElement.selectNodes("/Response/Results/DecodedVariable")
        'Set NodeList = xmlDoc.documentElement.selectNodes("/Response/Results/DecodedVariable/*")






        For Each Node in NodeList




         'I NEED SOME SORT OF LOGIC HERE
	           If Node.tagName = "VariableId" Then		        
		        ' 

Open in new window

0
I'm using VB.NET in ASP Web Forms.

I have a button click like this:

    Protected Sub Button1_Click(sender As Object, e As EventArgs)

        Dim DateTimeVar1 As DateTime
        DateTimeVar1 = "10/31/2018 01:05:00 PM"

        'Set Label With Variable Value
        Label1.Text = DateTimeVar1

    End Sub

How do I convert the DateTime variable DateTimeVar1 to a Date variable called DateTimeVar2 ?

So then the value stored in DateTimeVar2 should be: 10/31/2018
0
Hello, all.
(ASP Classic)

Splitting strings, in my case, I have multiple values coming from the database.

a = 94/95
b = value1/value2

Open in new window


Now, on the page, it will be.

<a href="?Type=Label&LabelID=<%=x%>" title="<%=y%>"><%=y%></a>

Open in new window


I can use a split, to get the values broken up.
However, since we are dealing with 2 different values coming in, I cannot use the split and it duplicates everything.

<%
a = split(LabelID,"/")
b = split(LName,"/")
for each x in a
for each y in b
'response.Write (x & "<br />")
%>
<a href="?Type=Label&LabelID=<%=x%>" title="<%=y%>"><%=y%></a>
<%
next
next
%>

Open in new window


So, my question is this.
How can I split it properly, to where it is only a single code that split both values?

Wayne
0
Hi Experts,

I'm trying to connect to a Access DB in order to sanitize some data using PHP. I Have already enabled by PHP PDO ODBC driver  (uncomment the extension=php_pdo_odbc.dll line in php.ini) and restarted my IIS.

I get the following code...
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] SQLDriverConnect: 63 [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x14b8 Thread 0x11e4 DBC 0x22f8444 Jet'.' in C:\inetpub\wwwroot\DICE-AccessNOC\includes\access_db.php:18 Stack trace: #0 C:\inetpub\wwwroot\DICE-AccessNOC\includes\access_db.php(18): PDO->__construct('odbc:Driver={Mi...') #1 C:\inetpub\wwwroot\DICE-AccessNOC\find-distinct.php(6): Access_DB::getDB() #2 {main} thrown in C:\inetpub\wwwroot\DICE-AccessNOC\includes\access_db.php on line 18

Open in new window


My includes/access_db.php is
<?php

$TBL = "TBL_DICE_Factorial_Analysis";

class Access_DB{
 
    private static $db;
    
    private function __construct() { } //no new objects can be created
    
    public static function getDB() {    
    
        $access_path = "Z:\\Business\\CLIENTS\\DICE Assessment\\Received Files\\NOC_Database_Backup_2_PHPCopy.accdb";
         
        //One connection per browser session
        if (!isset($db)) {
            $dsn = "odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)}; Dbq=$access_path;";
            self::$db = new PDO($dsn);
        }
        return self::$db;
    }
    
    public function __destruct() {

        self::$db->close();
        
    }
}

function print_variable($var, $label = '', $raw = true){

    echo '<br>=========START=========<br>';
    echo '<b>' . $label . '</b>';

    if ($raw == true) echo '<pre>';

    print_r($var);

    if ($raw == true) echo '</pre>';
    echo '<br>=========END=========<br>';
}
?>

Open in new window


The caller is
<?php
    require_once 'includes/access_db.php';
    
    $query = "SELECT * FROM $TBL ORDER  BY NOC_Code, NOC_Occupation; ";

    $db = Access_DB::getDB();

    $statement = $db->prepare($query);
    $statement->execute();
    $rows = $statement->fetchAll(PDO::FETCH_ASSOC);
    $statement->closeCursor();

    print_variable($rows, 'Fact Analysis');
?>

Open in new window


I have also given full permissions to HKEY_LOCAL_MACHINE\SOFTWARE\ODBC and its children to IIS_IUSRS, but the issue persists.

I'm also posting this under ASP, as I see on Google, this also occurs under ASP.

Any help will be greatly appreciated.
0
How do I extract parent values and all child values from deserialized JSON, one record per child value, to a List<T>?

Sample JSON:  json_sample.txt

So from the attached sample JSON we wish to add the following records to the  list:
Record 1:  aen: Y456789, studentID: 1016, need: MMM, rank: 1
Record 2:  aen: Y456789, studentID: 1016, need: PPP, rank: 2

All records with "needs : null" to be ignored and all "need": "Not Specified" to be ignored. Sample code below:



      CTFNeedDataBatch =
                           (from people in myJSON.content
                            select new NeedCTF
                            {
                                studID = people.StudentBasic.studentId.ToString(),
                                AEN= people.StudentBasic.aen.ToString(),
                                Code = (people.StudentSensitive.needs == null ? people.StudentSensitive.needs[0].need.ToString() : ""),
                                Priority = (people.StudentSensitive.needs == null ? people.StudentSensitive.needs[0].rank.ToString() : ""),
                            }).Where(w => w.Code != "").ToList();


The problem with this code is we are not getting any values from the "needs" element and even if we were, I doubt we would be getting more than one record from an element that has more than one need.
0
Hi, Experts, I've got problem Inserting data on sqlserver 2008 using ASP or vbscript language. My problem here is when the amountA is has a comma then it would not save the Data. A message says; "There are fewer columns in the insert..." This maybe because of the comma in the amountA. What is the solution to handle the comma within the amountA? Any help please!

   ename = "John"
   amountA = "10,000.00"
   
   con.execute("Insert into zPhone(eName,AmountA) values('" & ename & "'," & amountA & ")")
0
Build an E-Commerce Site with Angular 5
LVL 12
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

We have an old database with around 400 stored procedures.
The stored procedures are called from an ASP Classic application.

Is there a way to know reliably which of the stored procedures are not being used by the application?
Or do we need to search for the stored procedure name on all the ASP pages in the application in order to find those that don't have any match?
0
I am pulling my hair out on parsing a JSON API response (from ShipStation) due to the arrays within the response object.  I have always used a JSON parser (from demon.tw) which works perfectly for accessing the various items in a JSON object, however it does NOT work with arrays because of the fact that it is using JScript one cannot loop with a variable index.

I have tried a few other JSON classes but still had no success in being able to easily loop through each order and pull the relevant order information for each.

Below is a sample of the JSON response from the API. Can someone please help me loop through the orders (only 2 orders in the array in the sample below), and populate all the necessary order variables on each loop, such as OrderID, Customer info, billing/shipping addresses, line items ordered, priciing etc.


Open in new window

0
I have a job that I would like to get bids on...if that still happens on this site.  Here is what I need:

I need this page (https://www.gopherstateevents.com/results/fitness_events/results.asp?event_type=5&event_id=825&race_id=1427) to "scroll" vertically in marquee fashion for large screen display at races.  All I really need is the data table...or the data in the data table...to be visible.  Please let me know if you would be able to help me and what it would cost me.  I have tried to get this going in the "normal" process of doing it myself with EE help but, due to my weakness in JQuery, I just haven't gotten there.

Let me know if you have questions or if you can help me.
0
Hello, All;

Error
Active Server Pages error 'ASP 0126'
Include file not found
/cs/Header.asp, line 3
The include file '../Imported_Data/ACN.asp' was not found.

Code Line
<!--#include virtual="../Imported_Data/ACN.asp"-->

Open in new window


OK. I have been using this for years, and it still works on my Win2016 Server.
However, running it on my development system, of which is a Win10 Pro.
No longer works.
Enable Parent Paths
Is Enabled in IIS, for the Default Web Site, and all sub sites.

WHAT in the heck did Microsoft do, in the last update to break this?

The actual path of the files is stores in
wwwroot/Imported_Data/

I reference this location with all my sites.
And have NEVER had an issue, until the most recent Windows 10 update, and now it is broken.
At least on my Win10 system.
As stated, it all still works under my Win2016 servers.

Any idea on what can be done in order to get this back working again?
I would really hate to re-code all sites, just because of this one stupid issue.

Carrzkiss
0
Dear,
Any help to this problem?
31h.png
0
Experts -

I need a countdown timer in classic asp from 10 seconds to 0. (Without page refresh)

Ex:
In a DIV  (<p>)- I will need to say "Kindly allow 10 seconds for Request creation..., " Here the 10 should count down to 0. and Once it becomes 0, it should change the <p> text to "Request created".

I understand there are alot of timers available in js/jquery but my ask is unique and peculiar and i dont want the page / body to refresh every 10 seconds or so.

Kindly help.
0
Hi there.

I'm working on a recordset that is supposed to pull 20 records a time from thousands of records. Why? Do make an overview list load fast. So far I had a query pulling all records, and that takes 15 seconds to load. I use classic asp and VB.
I found a well working example how to load the data and navigate in the loaded data, and it loads fast enough. Now I have to implement the search options I used to have with parameters from user input. And I have some trouble making the script work. I hope you can help. I probably made some syntax errors. Here's my code:

<%
    'Set how many records per page we want
    Const NumPerPage = 20

    'Retrieve what page we're currently on
    Dim CurPage
    If Request.QueryString("CurPage") = "" then
        CurPage = 1 'We're on the first page
    Else
        CurPage = Request.QueryString("CurPage")
    End If
	
    Dim conn, ConnString
    ConnString = MM_conmelanom_STRING
	Set conn = Server.CreateObject("ADODB.Connection")
    conn.Open(ConnString)

	Set rs_cmd = Server.CreateObject ("ADODB.Command")
	rs_cmd.ActiveConnection = MM_conmelanom_STRING

	rs_cmd.CommandText = "SELECT * FROM view_dataedit WHERE patient_id LIKE ? AND (SUBSTRING(cprnr,1,6)+SUBSTRING(cprnr,8,4)) LIKE ? AND initialer LIKE ? AND regime LIKE ? ORDER BY sortid DESC" 
	rs_cmd.Prepared = true
	rs_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 200, 1, 20, "%" & Recordset1__MMColParam & "%") ' adVarChar
	rs_cmd.Parameters.Append 

Open in new window

0
Hi all,

I have a new server with windows 2016, and I need to copy across an small number of ASP websites.

So, starting with a single website, I installed all the necessary files and ran the site. When loading a page that connects to an SQL server database, an error occurs and I get a link to a website assuming that ASP is not activated.

To verify that it is, I have loaded a test .asp page and it does load correctly.

I think the issue is related to MDAC, I have tried to install version 2.8 but I can't tell if it actually did install or not. I can't confirm this is the issue but do believe it is database related.

Has anyone else encountered a similar issue, and resolved it?

Any help is appreciated.

resourcesys.
0
We just upgraded to Exchange 2016 from Exchange 2010 and all of our CDO mail-enabled Classic ASP sites are no longer sending mail properly.  As far as I can tell the emails just end up in the BadMail folder on the webserver.  Any direction is most appreciated!  This is a time sensitive issue for us.

Example:

    Set iMsg = CreateObject("CDO.Message") 'calls CDO message COM object
    Set iConf = CreateObject("CDO.Configuration") 'calls CDO configuration COM object
    Set Flds = iConf.Fields
    Flds( "http://schemas.microsoft.com/cdo/configuration/sendusing") = 1 'tells cdo we're using the local smtp service
    Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "e:\inetpub\mailroot\pickup" 'verify that this path is correct
    Flds.Update 'updates CDO's configuration database
    Set iMsg.Configuration = iConf 'sets the configuration for the message
	
    iMsg.To = "yyyyy@thecenter.org"
    iMsg.CC = "zzzzz@thecenter.org"

    sEmailBody = "Please find the attached file for checks dated " & sCheckDate & vbcrlf & vbcrlf & sContent
    iMsg.AddAttachment "e:\Inetpub\wwwroot\CBCHECK\data\ARS311584621i.txt"
    
    iMsg.From = "webmaster@thecenter.org" 'must be "someone@domain.com"
    iMsg.Subject = "FE - CBCHECK - " & sCheckDate 
    iMsg.HTMLBody = sEmailBody

    iMsg.Send 'commands CDO to send the message

Open in new window


Thanks,
Andrew
0
CompTIA Security+
LVL 12
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

Is there a way to execute a classic asp form submission on a schedule with a timer (ie: submit the form every 30 seconds)?  I have a vb6 application that puts race results online every 30 seconds and I want to send individual results emails automatically from the web site without having to click the submit button.

Thanks!
0
Is there a way to take a page with a jquery data table and have it scroll through the page (top to bottom) continuously?  I have race results pages that I would like to display on race day so that folks can view their results by watching the results scroll by.  Here is a current results page with a jquery table that does NOT scroll:

https://www.gopherstateevents.com/results/fitness_events/results.asp?event_type=5&event_id=629&race_id=1280

I would "clean the page up" for the scrolling page so that it is just the table.

If there is not a data table solution to this, is there another approach I can use to have this happen?

Thank you in advance!
0
I have a Classic ASP web page, containing a simple data entry form, plus another ASP script to process the form's input, and insert that input to a database table. Everything is working just fine.

Now, I would like to have two combo boxes so that users can select items from another table, as input, instead of everything being free-form. I can show a dropdown list with hard-coded items, but I can't figure out how to show items from a table instead (or how to process the selected items).

It should really be a fairly simple task, but I can't seem to find anything on the web that matches my simple question - they are all complex scenarios.

Perhaps if I list the code, someone can show me the extra code required for the combo/dropdown list?

My request comments are on lines 12 and 17.

The main ASP page :

----------------------------------
inc_pastoral_entry.asp
----------------------------------
<form action="updateconcern.asp" method="post">
  <legend>Pastoral Concern Record</legend>
 
  <table>
   <input type="hidden" name="SchoolID" value="<%=intID%>" />
	
	<tr>
     <td><label>Concern:</label></td>
      <td><textarea name="Concern" rows="10" cols="60" wrap="soft"> </textarea></td>
       </tr>

   <tr>  <!---***This is where I want the dropdown containing values 1,2,3,4,5, just the numbers, not pulled from a table***--->
    <td><label>Severity:</label></td>
     <td><input name="Severity" size="12" type="text" /></td>
	  <tr>

   <tr>  <!---***This

Open in new window

0
I am on a project which requires me to make modes to apps
which have asp directive:

 <!--#include virtual="/global/inc/footer.aspx"-->

on multiple pages.

We can only use IIS express in development therefore I get error:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Parser Error
  Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

 Parser Error Message: Could not find a part of the path 'C:\Fraud-Tip-Form\Fraud-Tip-Form\global\inc\footer.aspx'.

Source Error:



Line 332:                    <tr>
Line 333:                        <td>
Line 334:                            <!--#include virtual="/global/inc/footer.aspx"-->
Line 335:                        </td>
Line 336:                    </tr>
 

 Source File:  /index.aspx    Line:  334
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Is there a way around using IIS Express.  We are prohibited from using IIS for testing.
Currently, I am just deleting the include directive for testing.
0
I used do a lot of Classic ASP!

Now on a Wordpress site, I want to have a QUIZ, with some questions and dropdowns and textboxes, with Submit buttons.
I need to collect the answers in a database table, grab username, store in session variable (as need several pages).

Can someone point me in the right direction please?

Thanks
0
Hi!  I inherited a classic ASP site in 2012r2 running IIS 6.2.  I turned on "Detailed Errors" but all i get is:

An error occurred on the server when processing the URL. Please contact the system administrator.
If you are the system administrator please click here to find out more about this error.

The "here" is just a link to MS KB Page "Classic ASP Not Installed by Default on IIS 7.0 and above" which seems inapplicable to IIS 6.2 and most of the ASP runs fine so all the correct features are installed.  The last time I worked with classic ASP (LOOOooong ago) I configured IIS to serve detailed errors and I got a stack dump and what line of what ASP page the error was on.  I think this page error page was created by my predecessor, but I don't know how to get rid of it and get the detailed errors back.

I need the detailed errors to debug some issues on this unfamiliar site.

Is someone expert enough at old stuff to have a clue how I might turn the full error detail display back on?
0

ASP

81K

Solutions

31K

Contributors

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.