Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x

ASP

80K

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

Hi experts, I'm trying to rename one of my tables but the solution below didn't work. When I execute it an error meassage says; "Incorrect syntax near the keyword 'TABLE'." I'm using Sql 8. Any help please!


RENAME TABLE Personnel TO newPersonnel
0
Free Tool: Site Down Detector
LVL 10
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Hi experts, How to put a condition in a certain field (datetime). I have column named, theDateIn which has a data "2017-09-24 08:02:39.000", "2017-09-24 07:50:44.000". I'm trying to retrieve by using this code but it didn't work.

Select TheDescription from eCho where theDateIn Between '2017-09-24' And '2017-09-24' order by Theicnt asc

Please note that the code will work if i make  '2017-09-25' or september 25, in the end part but my existing data doesn't have 25th of september all are 24th only. I also notice that it also work  If i remove the time in the database. Which part of the code should need to add or change? thank you!
0
Hi all, I have set out some data, however I am not sure if it is possible to list it in a specific way

For each product (prod_ID) there is events that happen, no matter what date the event is (like lines 20-24 & 32 & 33)
product is the Formula 1 event

For each departure (dep_ID) there would be different things happening (like lines 25 & 31)
departure is the specific package (where as there could be different-longer packages with different itinerary)

Data:
TABLE: prod_itin
itin_ID	brand_ID	cons_ID	date_added		itin_live	prod_ID	dep_ID	itin_day	itin_IATA_start	itin_start	itin_finish	itin_IATA_finish	itin_item
20		GPT		1	9/08/2017 1:00:00 PM	Yes		3		1		AEGPA		1:00:00 PM	2:30:00 PM				Free Practice 1
21		GPT		1	9/08/2017 1:00:00 PM	Yes		3		1		AEGPA		5:00:00 PM	6:30:00 PM				Free Practice 2
22		GPT		1	9/08/2017 1:00:00 PM	Yes		3		2		AEGPA		2:00:00 PM	3:00:00 PM				Free Practice 3
23		GPT		1	9/08/2017 1:00:00 PM	Yes		3		2		AEGPA		5:00:00 PM	6:00:00 PM				Qualifying
24		GPT		1	9/08/2017 1:00:00 PM	Yes		3		3		AEGPA		5:00:00 PM						Race
25		GPT		1	9/08/2017 1:00:00 PM	Yes			6	1		AUH		2:00:00 PM						Check-in
31		GPT		1	9/08/2017 1:00:00 PM	Yes			6	5						10:00:00 AM	AUH			Check-out
32		GPT		1	9/08/2017 1:00:00 PM	Yes			6	1		AEGPA		8:00:00 PM						Concert: Calvin Harris
33		GPT		1	9/08/2017 1:00:00 PM	Yes		3		4		AEGPA		8:00:00 PM						Concert: P!NK

TABLE: prod_deps
dep_ID	brand_ID	cons_ID	date_added		dep_live	prod_ID	dep_date	dep_type	dep_conf	dep_sold	dep_prod	

Open in new window

0
Hi experts, How to set in sql command the table below where I wish to display by group the field name theId. Please see the table below!

Amount       Desc                                      TheId
10                 fair                                          x
12                 meals                                     y
15                 allowance                              y
15                 fuel                                         x
50                 Medicines                              x

I tried this command but it doesn't work;

Set rs = cn.Execute("Select Desc, theId, Amount from PList group by TheId")
0
Hi experts, please help me  understand what's the reason why some computers cannot  get the message from the server while trying to  accessed it? The codes below is trying to test the server response how the server deal with the response. My laptop is able to get message while some of my destops, pc cannot. I'm using chrome to all computers but some of my computers cannot get the message from the server. The alert box message will appear blank but some computers able to obtain the message.

Js

 function iSaveToServer(x)
{
	if (window.XMLHttpRequest)
	  {// code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp = new XMLHttpRequest();
	  }
	else
	  {// code for IE6, IE5
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	xmlhttp.onreadystatechange=function()
	  {
	  if (this.readyState==4 && this.status==200)
	    {
	        	var str = this.responseText; 
	        	alert (str);
	    }
	  }                                             
		xmlhttp.open("GET","SendMsg.asp?a="+ x, true);
		xmlhttp.send();
}

Open in new window


Asp


<%
dim msg
msg = request.querystring("a")

response.write("test-1")
response.end()

%> 

Open in new window

0
Hello Experts,

I have a JS function called thru asp webpage , I get NULL object if I call the function
function test()
{
  alert(select);// I get NULL value
}
<select id="mySelect" size="4" onchange="return test();">

Open in new window


But I get the object value if I pass the function with parameter.
function test(select)
{
 var select = document.getElementById("mySelect");
  alert(select);// I get the value
}
<select id="mySelect" size="4" onchange="return test(this);">

Open in new window

0
I am having issue trying to get my Web Application published and running correctly on our IIS server.

When I test from within Visual Studio 2015 with the same ODBC driver setups, everything works fine.  It is only once I try to publish the Web Application and access it off the IIS webserver in a browser that I am getting an issues.

I am using Visual Studio 2015 v14.0.25431.01 Update 3

The IIS server is a 64-bit Windows 2016 server

The ODBC driver is a Progress OpenEdge 11.6 driver - 32 Bit

The ODBC connection is setup using the 32-b it ODBC Manager found in c:\windows\sysWOW64\odbcad32

I came across many forums that say to make sure that the ODBC driver is setup correctly, and using the correct ODBC manager, which it is.

I also came across some posts that reference compiling the Web Application and specifying in the Configuration manager to use x86 instead of Any CPU.  x86 is not an option when I go into the configuration manager.

I am at a loss as to how to resolve this error so that I can access the new Web Applications from the IIS server.


The error I get is...

Server Error in '/' Application.

ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception …
0
Hi experts, I have a database with the following datas;

code     description     Qty     Date
1175     Para                  1        9\12\2017
1188     Amox                3        9\12\2017
1175     Para                  2        9\12\2017
1188    Amox                 2        9\12\2017
1199    Cefa                    1       9\12\2017

We can see here, two Para and two amox. I want them to merge or add its quantity that would result with the follwing view;

code     description     Qty     Date
1175     Para                  3        9\12\2017
1188     Amox                5        9\12\2017
1199    Cefa                    1       9\12\2017

How to set a condition to achieve the goal? I have a solution but this is not working for this purpose.

Set rs = cn.Execute("Select code, description, quantity  from SoldItems")
0
I have some text files, I handle them with asp

Some have &#225; that I can replace with "á"  no problem (same for other accented characters)

But they also have:

á   I print to the screen and thay come up as á

I try to

datos=replace(datos,"á","á")

But the replacement doesn't happen.

Any ideas?
0
I am having difficulty with Unicode Chinese characters from my ASP web page being written to my SQL database.

The SQL column (called 'Company') used to store the Chinese characters is defined as follows:
Company  nvarchar(255) NULL
and it has a COLLATION of: SQL_Latin1_General_CP1_CI_AS

My ASP web page has the following defined at the top of the page:
<%@LANGUAGE="VBSCRIPT" CodePage = 65001%>
<%
Option Explicit
Session.CodePage = 65001
Response.charset ="utf-8"
Session.LCID     = 1033
%>

The SQL Statement used to write out the Chinese string to the Company column is as follows:
UPDATE Customers set Company = N'秋诺儿' WHERE loginid = 19

The update occurs but when written to the database (and upon subsequent display on the page), there are just question marks ('???') in the Company field.

Can someone help me understand where I am going wrong with this attempt to write Chinese characters to a SQL database?

Thanks Experts!
0
Free Tool: SSL Checker
LVL 10
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Hi experts, I'm having trouble sending file to .asp server using ajax as the code shown below. I've observed that too much character could hinder the asp server not to receive, sending an error says; "The source you are looking for has been removed, had its changed or is temporarily unavailable". My question is, Is there other way forcing the server to receive big data using Ajaz like the way i used below? What approach should i use to handle big data to send .asp server? Thanks experts!

 
function iGetPerona(x,code,inv)
{				
	if (window.XMLHttpRequest)
	  {// code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp = new XMLHttpRequest();
	  }
	else
	  {// code for IE6, IE5
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	xmlhttp.onreadystatechange=function()
	  {
	  if (this.readyState==4 && this.status==200)
	    {
	        var msg = this.response;
	        alert(msg);
	    }
	  }                                            
		xmlhttp.open("GET","SavePersona.asp?a="+x + "&idb="+ mcCode + "&b=" + code + "&c=" + inv, true);
		xmlhttp.send();
}

Open in new window

0
Hi experts, Due to poor connection or internet connectivity I encountered an error that says; "The source you are looking for has been removed, had its changed or is temporarily unavailable" this message is coming from the response of the network.  I am using ajaz as the code shown below and here I want to catch the error and put it in an alert box. Is this possible using the code below? Please help. Thank you!

Js

function iGetPerona(x,code,inv)
{				
	if (window.XMLHttpRequest)
	  {// code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp = new XMLHttpRequest();
	  }
	else
	  {// code for IE6, IE5
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	xmlhttp.onreadystatechange=function()
	  {
	  if (this.readyState==4 && this.status==200)
	    {
	        var msg = this.response;
	        alert(msg);
	    }
	  }                                            
		xmlhttp.open("GET","SavePersona.asp?a="+x + "&db="+ mcCode + "&b=" + code + "&c=" + inv, true);
		xmlhttp.send();
}

Open in new window

0
I had this question after viewing Export data to Excel from Classic ASP page.

My question is similar, and I had trouble with the line
Set rstSearch = cnnSearch.Execute(strSQL)

Open in new window

...which returned the error message "Object required: ''

I understand roughly how the code works, but I simply cannot get it to work for me, after modifying it to suit my example.

So, to show what I'm trying to achieve (a simple export to Excel), I've made the simplest possible example to return the 3 rows in a small table, and I'd like to be able to click a button to export this to Excel (I know the "form" section does this).

Here is my code in its simplest form :  
<!--#include file="inc_dbconn.asp"-->
<!--#include file="adovbs_inc.asp"-->

<html>
<body>
<%

      set rs = Server.CreateObject("ADODB.recordset")
       sql = "SELECT ID, Firstname, Surname FROM JIM_Test1"
	    rs.Open sql, conn
	     if not rs.EOF then
%>
<table border="1px">
<tr>
<td>ID</td><br>
<td>Firstname</td><br>
<td>Surname</td><br>
</tr>
<%
    	  do until rs.EOF
%>
<tr> 
<td><%Response.Write(rs.Fields("ID").value)%></td>
<td><%Response.Write(rs.Fields("Firstname").value)%></td>
<td><%Response.Write(rs.Fields("Surname").value)%></td>
</tr>
<%
  rs.movenext
   loop
    end if
     rs.close
      conn.close
       set conn=nothing
        set rs=nothing
%>
</table>

</body>
</html>

Open in new window

, and this is the SQL to create the data (if you need to) :
IF OBJECT_ID('JIM_Test1') IS NOT NULL DROP TABLE JIM_Test1

CREATE TABLE JIM_Test1
 (  
  ID INT,
  Firstname nvarchar(20), 
  Surname nvarchar(10) 
 )

 INSERT INTO JIM_Test1 VALUES (1, 'Fred', 'Jones');
 INSERT INTO JIM_Test1 VALUES (2, 'Joe', 'Wilson');
 INSERT INTO JIM_Test1 VALUES (3, 'Andy', 'Smith');

Open in new window

This should be something that is easy to do, but for some reason I'm doing something wrong.
Any help much appreciated!

Thanks

Jim
0
For a decade I had in place code that would add and update data in MSSQL tables. The code has stopped working, giving me errors such as this e:
Microsoft OLE DB Provider for ODBC Drivers error '80004005' 
[Microsoft][ODBC SQL Server Driver][SQL Server]The cursor does not include the table being modified or the table is not updatable through the cursor. 

Open in new window


In order to solve the problem, i tried to simplify what am doing with a test program, the code of which appears here:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<!--#Include virtual ="includes/OpenData.asp"-->
<!--#INCLUDE Virtual="/includes/GlobalDefaults.asp"-->
<!--#Include virtual ="includes/adovbs.inc"-->
</head>
<body><%
strIP        = Request.ServerVariables("REMOTE_ADDR")
strEmail 	= "info@webuidler.us"
strTelephone = "516-123-4567"
strSQL =	"INSERT INTO [tblFeedback](Email,Telephone,IP,TimeStamp) "&_
				" VALUES ('" & strEmail& "','"& strTelephone & "','"& strIP & "','"& now & "');" &_
				"SELECT @@IDENTITY FROM [tblFeedback];"
Set RS = cnnData.Execute(strSQL).NextRecordset
iFeedbackID = cInt(RS.Fields(0))
RS.Close
set RS = nothing
response.write "New ID: " & iFeedbackID & "<br>"


set RS = Server.CreateObject("ADODB.RecordSet")
RS.Open "select * from tblFeedback where FeedbackID =" & iFeedbackID,cnnData,adOpenDynamic,AdLockOptimistic
RS("FullName") = "Lawrence Seltzer"
RS.Update
RS.Close
set RS = nothing
response.write "Record " & iFeedbackID & " updated with new information.<br>"
%>
</body>
</html>

Open in new window


the opendata.asp file simply opens the database:

<%
dim cnnData
Set cnnData = Server.CreateObject("ADODB.Connection")
cnnData.Open "Driver={SQL Server};server=mssql3.webuilder.cc;UID=jkrasna_admin; PWD=xxxxxxxx; database=jkrasna_data;"
%>

Open in new window


adovbs.inc contains the values for adOpenDynamic & AdLockOptimistic

The first part of the program works fine, and the record is correctly inserted.

The second part fails with error at the top of this question.
I use this logic in many different programs, across many different clients:
1. Create an object for a record set
2. Find the appropriate record
3. modify the field in the record
4. save the changes - this is the line that causes the error.

I was told that new security updates to MSSQL servers are what caused my working code to stop working.

If so, how can I quickly and easily work around this? I want to make as few changes as possible because there are so many other programs out there on my client websites that have this same problem.

Thank you.
0
strUploadPath = "\\m222513vaps3119.prd.automdir.com\InetOnTracAdvantagePlans$"
      Upload.LogonUser "prd","vDirOntracAdvPl","Mitzelplik!"
      Upload.Save(strUploadPath)
I am getting the below error:
Persits.Upload.1 error '800a001e'

Logon failure: unknown user name or bad password.  

/excel_upload.asp, line 56

Can someone help ????
0
Experts - I am getting pdfs from different people with different formats.

Ex: I may have 6 different templates or formats of PDFs.

Need to create something where I need to import PDF and design a template and choose what field to import in excel. Can someone guide me on freewares or something that I can create or any live examples please.
0
I have a number of urls some are http:// and some https://

Xstandard has a function that lets me read directly into an asp variable for http:// but not for https://

The workaround I use form with post and jquery  to autosubmit. It sends the data and I can manipulate it but it is not as practical as I would wish.

Any ideas?

Thx
0
Hi experts, I wanted to know how server pc handle the multiple clients while accessing the data at the same time. I am beginner developing web programming, and have a little background of vb6 language. Here what I exactly wanted to know, I have a server side Asp named, GetProduct.asp When in terms of response to the client upon the request, does it matter the response of it base on the number of clients having a request? Since I've only one GetProduct.asp How could the server handle it? Let's say, for example 1,000 clients who have requested to inquire the product at exactly the same time, does the response of the server will cause a delay because of the multiple request? if it could cause the traffic because of the numbers of request, should I need to assign GetProduct.asp per client? I hope you (experts) can give some insight about this. Thank you!
0
Hi experts, I'm trying to upload files base on the codes below but I'm having trouble with files.asp when executing the code an error says; The page cannot be displayed because an internal server error... I'm using Windows 10 OS and I don't know what Server.CreateObject should I use if this is the cause of an error. Please help!

Html

<html>
<head>
<title>Uploading a file and saving to disk</title>
</head>

<body>
<h3>File Upload</h3>
<form method=post action="filesave.asp" enctype=multipart/form-data>
<input type=file name=filesent><br>
<input type="submit" value="Send File">
</form>
<p><a href=view.asp>View files already uploaded</a></p>
</body>
</html>

Open in new window

Asp server side

<%@ language=vbscript %>
<%

  'Use one of the following lines, depending on the version of csASPUpload
  'Set Upload = Server.CreateObject("csASPUpload32.Process")
  'Set Upload = Server.CreateObject("csASPUpload32Trial.Process")
  Set Upload = Server.CreateObject("csASPUpload64.Process")
  'Set Upload = Server.CreateObject("csASPUpload64Trial.Process")

  'For the earlier version of csASPUpload:
  'Set Upload = Server.CreateObject("csASPUpload.Process")
  'Set Upload = Server.CreateObject("csASPUploadTrial.Process")

%>
<html>
<head>
<title>Saving file</title>

</head>

<body>
<%
  'Read the upload
  Upload.Read

  'Check there is a file before trying to save it

  If Upload.FileQty > 0 Then

   Upload.FileSave Server.MapPath("./files/") & "\" &  Upload.FileName(0), 0

%>
   <p>The file has been stored</p>
   <p><a href=fileupload.htm>Upload</a> another file.</p>
   <p><a href=view.asp>View</a> files already uploaded.</p>
<%
  Else
%>
   <p>No file was received</p>
   <p><a href=fileupload.htm>Upload</a> another file.</p>
   <p><a href=view.asp>View</a> files already uploaded.</p>
<%
  End If
%>
</body>
</html>

Open in new window

0
Important Lessons on Recovering from Petya
LVL 10
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

I have some strings and I need to extract the emails in them with an asp function
0
Hello I have this code in HTML and VBScript


<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<META http-equiv="Pragma" CONTENT="no-cache">
<TITLE>Support</TITLE>


<title>Form to Support</title>
<style type="text/css">
<!--
.style1 {color: #ffffff}
.BotonExit {
	color: #ffffff;
	background-color: #ff0000;
}
.BotonSubmit {
	color: #ffffff;
	background-color: #336699;
}
.BotonReset {
	color: #ffffff;
	background-color: #336699;
}
-->
</style>
</head>
<body> 
<SCRIPT>
	
</script>

<%



'Single Variable Declarations
Dim myString, racecn, cn, stringrace

racecn = Request.QueryString("racecn")

if racecn = "" then racecn = "General Topic"

Session("cn") = racecn

Session("maestrocn") = racecn


%>



<div align="center">
<form method="POST" action="cdosys.asp" name="form1">




<%
Response.Write("Question: <b>" & Session("cn") & "<br /></b>")
%>



 	



</form>
</div>
</body>
</html> 

Open in new window


now this code is .asp and I call like http://xxx.xxx.xxx/file.asp

For example if I want to pass special characters like:

http://xxx.xxx.xxx/file.asp?racecn=M%F3dulo%201%20exp

The results are:

M�dulo exp

The result must be: Módulo 1 exp

How can be fixed?

Note:

If I use like this:

http://xxx.xxx.xxx/file.asp?racecn=Módulo%201%20exp

works but I don´t want that because I´m passing the variables from other page.

Then what can be added or removed to the script above to accept:

http://xxx.xxx.xxx/file.asp?racecn=M%F3dulo%201%20exp

and results in:

Módulo 1 exp

instead of the corrupted M�dulo exp

Thank you
0
I have a long asp string the only data I need to extract are blocks that are clearly delimited bi strings. Sat all blocks start with "alfa-beta"  and end with "omega-zeta"

 The string has several blocks like

alfa-beta hyggekkr kkrkk krkrmmmrkkkknnnnr 4%ffaeee omega-zeta

I need to extract  al the blocks like hyggekkr kkrkk krkrmmmrkkkknnnnr 4%ffaeee

of course all the blocks have different data

like

alfa-beta holy smokes that was a fox omega-zeta

I need holy smokes that was a fox

You get the idea

Thx
0
I have a <form method ="post" action="action.asp">
<input type="text" name="data" value=<%=string%>>

When the string is very long  (say 256K) it is not passed to action.asp.

When I set
data=request.form("data")

And response.write data

I get an error.

Not allowed

Wtih shorter strings it works fine. This is on my server windows 2012 iis 8.

I am sure there is a setting to allow larger strings. I just cant figure out where to set/reset it

Any ideas?
0
I rarely work with XML, so it's always a bear to figure out the right method of parsing values. I have an import function I built years ago (to import batch settlement data from AuthNet), but just discovered a [big] problem.  The code below loops though each "transaction" node (I thought) and then gets all the values for that transaction:

for each item in xmlDoc.getElementsByTagName("transaction")

				If Not xmlDoc.getElementsByTagName("transId").item(i) Is Nothing Then transId = xmlDoc.getElementsByTagName("transId").item(i).text else transId = ""
				If Not xmlDoc.getElementsByTagName("submitTimeLocal").item(i) Is Nothing Then submitTimeLocal = xmlDoc.getElementsByTagName("submitTimeLocal").item(i).text else submitTimeLocal = ""
				If Not xmlDoc.getElementsByTagName("transactionStatus").item(i) Is Nothing Then transactionStatus = xmlDoc.getElementsByTagName("transactionStatus").item(i).text else transactionStatus = ""
				If Not xmlDoc.getElementsByTagName("invoiceNumber").item(i) Is Nothing Then invoiceNumber = xmlDoc.getElementsByTagName("invoiceNumber").item(i).text else invoiceNumber = ""
				If Not xmlDoc.getElementsByTagName("firstName").item(i) Is Nothing Then firstName = xmlDoc.getElementsByTagName("firstName").item(i).text else firstName = ""
				If Not xmlDoc.getElementsByTagName("lastName").item(i) Is Nothing Then lastName = xmlDoc.getElementsByTagName("lastName").item(i).text else lastName = ""
				If Not 

Open in new window

0
I have 10TB of client data, spread across hundred of millions of files, avg size 200KB, stored in millions of folders, served from an EC2 instance acting like a traditional NAS, using Windows File System on a Windows Server 2003 R2 EC2 server.

These data are uploaded and downloaded through our Classic ASP site, served from IIS websites, reading/writing data through UNC (network path) to the NAS.

Storage on AWS are expensive (storage+snapshot+ec2), so I would like to move to S3, but still maintain proper security, so files are not available to everyone on the Internet if they know URL.

Any recommendations to this approach? How to maintain support through Classic ASP? Anyone did this storage migration in the past in same Windows environment? How to maintain client security?
0

ASP

80K

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.