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

Oh men,
Im wondering it is a free plugin or some calendar for  an consulting room apointment
its any idea or recomendation if its for free or open source better
regards
0
Salesforce Has Never Been Easier
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Hello,

I want to add a csv file to database. There is a column in csv file called as merchant_id same as column in SQL database. I want to update the row in database if the "merchantid" exists in database or if it doesn't exist , we need to add that row from csv file .


Here  

"rs" contains all the columns of the CSV file and its values.

"rsAdd" contains all the columns of Database table(Merchants) and its values.

Set rs = GetRecordSet("C:\upload\new\" & TheNewFileName2)
    'Response.Write "No Errors"
    Set cn = Server.CreateObject("ADODB.Connection")
    cn.ConnectionString="DSN=REWC"
    cn.Open
    i = 0
		TheSql = "SELECT * FROM Merchants"
        Set rsAdd = Server.CreateObject("ADODB.RecordSet")
        rsAdd.CursorType=1
        rsAdd.LockType=3
        rsAdd.Open TheSql, cn
        
    While not rs.EOF
				
			rsAdd.AddNew            
            For Each col in rs.Fields				
                rsAdd(Replace(col.Name,"_","")) = col.Value
            Next		
			
        rsAdd.Update
        rsAdd.Move 0        
        rs.MoveNext
        i = i + 1
        If (i mod 100)=0 Or i=1 Then
            Response.Write i & ","
            If (i mod 2500) = 0 Then
                Response.Write "<br />"
            End If
        End If
    WEND
	
    rsAdd.Close
    Set rsAdd = Nothing	
	End If

Open in new window

0
ID = "1"

ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("../xgtr/blabladatabase.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open ConnectString

RS.open "SELECT * FROM [" & Location & "] WHERE ID =' & ID & '", conn, 3, 3

Response.Write "" & Location & "<br>"
Response.Write "ID = "
Response.Write RS.fields("id").value
//also tried  Response.Write "" & ID & ""
//also tried  Response.Write "' & ID & '"
//also tried  Response.Write " & ID & "

I have form that feed this page. The  ID value and Location being passed via hidden input.  Just for testing i am defining the ID as ID=1.  Otherwise I can use ID = Request("ID").  FYI, ID is a value (key)


The Response.Write code is only to see if the data is being passed.  I can get the location to pass, but not the ID.

Please advise.
0
I know it's kind oldy to use ASP (active server pages) in 2017 but my customer site is built in asp and he does not want to change it.

He asked me to do a form that you can see here http://www.preventys.net/shopquizz.asp

The form is working great.

My problem is with the postback function.

When postbacked, i need the window to go to the field checked and not return to the top of the page. You can for example go to the last record in the form and check yes or no, it will reload as postback, but you will be sent to the top of the page.

here after the complete code


<form id="Form_ID" name="Form_ID" method="Post" action="<%=getsess("currenturl")%>">
            <table border="1" cellpadding="5" cellspacing="2" class="TableContact">     
                <%
                dim qConn, qDBC, qSql, qRs
                dim counter : counter = 1
                shopopendatabase qdbc
                qSQl="Select * from questionnaire order by qid ASC" 
                Set qrs = qdbc.execute(qsql)
                if not qrs.eof then
                    do while not qrs.eof
                        StrQuestionLabel(counter) = qrs("question_label")
                        StrQuestionHelp(counter) = qrs("question_help")

                        ' questions principales
                    %>
                    <tr>
                        <td align="cennter" valign="middle"><h3><%=qrs("qid")%></h3></td>
                        <td width="15" align="cennter" 

Open in new window

0
Hi experts, I wish to read .txt on the client side, is this possible? any help please!
0
I had this question after viewing C++ COM Method with Optional Arguments.

I am trying to produce a COM object in Visual C++, where one of the methods accepts optional arguments. Below are the interface declaration, the class implementing the interface, and the implementation of the method taking an optional argument. As it stands, it compiles. But when I try to call the function from an ASP page using VBS with the supposedly optional parameter missing, I get the following error


Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment: comObject.ShowFinalSql

Following code in IDL
interface IWPharma : IDispatch{
   [id(2), helpstring("method ShowFinalSql")] HRESULT ShowFinalSql([in] BSTR query, [in] BSTR cleanup);

in C++:
    STDMETHOD(ShowFinalSql)(BSTR query, BSTR cleanup) override

in VB with error:
SET comObject = CreateObject("WPharma.Main")

REM Тест #1
comObject.ShowFinalSql "CHECK_SIGNATURES 01/01/2017", ""
0
Hello All;

I have a linked Query, that when run, allows me to connect and use the connection to copy data from the LIVE DB to the LOCAL DB.

Create linked DB
sp_addlinkedserver 'NAME-THE-CONNECTION', '', 'SQLNCLI', NULL, NULL, 'Server=IP-ADDRESS-OF-SERVER', NULL
exec sp_addlinkedsrvlogin 'NAME-THE-CONNECTION', 'false', NULL, 'USERNAME', 'PASSWORD'

Open in new window


This is the script to copy data from the LIVE to the LOCAL.
insert into LocalTable (uid) select uid from [NAME-THE-CONNECTION].[LIVE-DB-NAME].[dbo].[LiveTable]

Open in new window


I can run the linked table script first in SQL Server, and then run the insert statement, and it works great.
So, my issue is this.

How would I write this to run from within an ASP page, all in one clean process?

Thanks all;
Carrzkiss
0
This question is a follow-up to this (solved) one :

https://www.experts-exchange.com/questions/29017643/classic-asp-edit-a-data-field-returned-by-a-sql-server-query.html

My goal was to be able to update records in a Classic ASP application, and that part is fine. The last step in my code is a Response.Redirect statement, which reloads the page after the update. This is fine, but as the form spans more than one page, after the update the user is not returned to the exact point in the page (has to scroll to get to the exact record again).

I looked at the code provided by Wayne Barron (http://www.cffcs.com/Tutorials/carrzkiss/39/Q_24801116.asp) [*excellent tutorial, btw - thanks!*], and I tried adding an anchor, but this only takes the user back to the top of the form, not to exact point where he left off, after clicking the "Save" button.

As each row of the form has a unique ID (getConID above), I tried using this also, in the redirect statement, but it did not work.

This is the code I use to update a record in the form :

<%
'updateform.asp v03 22-06-2017
getConID = request.form("ID")   'this is the unique row identifier
getCom = request.form("Comment")
getSchoolID = request.form("SchoolID")
 
' Now update the live TblReportsStoreComments table

Set sqlProp=Server.CreateObject("ADODB.Command")
sqlProp.ActiveConnection=Conn

sqlProp.commandtext="UPDATE TblReportsStoreComments SET txtComment=? where TblReportsStoreCommentsID=? "
sqlProp.Parameters.Append

Open in new window

0
I have  sun server that runs a local application that uses the following ports: JMS 5630, XML 9672,
ASP Http 80 and ASP https 443, i can only telnet to port 80, telneting to the other ports I get
unable to connect to remote host: connection refused. I checked the /etc/services and I do not see the ports listed.
BTW: This application used to work without problems...

Thanks
0
Hi experts, I need to upgrade high version of excel to export html table to excel. The codes below are able to export from table to excel, How can i upgrade it to high version of excel with an extension .xlsx  ? any help please!

<!DOCTYPE html>
<html>
	<head>
		<title>jQuery Boilerplate</title>
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
		<script src="dist/jquery.table2excel.min.js"></script>
	</head>
	<body>
    <button class="WinExcel">Export</button>
        <table class="Stocks32">
          <tr>
            <td>Erwin M. Malalis 500</td>
          </tr>
        </table>
<script>
	$(function() {
		$("button.WinExcel").click(function(){
			$(".Stocks32").Stocks32({
				exclude: ".noExl",
				name: "Excel Document Name",
				filename: "Prolist",
				//fileext: ".xls",
				exclude_img: true,
				exclude_links: true,
				exclude_inputs: true
			});
		 });
	});
</script>  
	</body>
</html>

Open in new window


!function(a,b,c,d){function e(b,c){this.element=b,this.settings=a.extend({},k,c),this._defaults=k,this._name=j,this.init()}function f(a){return a.filename?a.filename:"Stocks32"}function g(a){var b=/(\s+alt\s*=\s*"([^"]*)"|\s+alt\s*=\s*'([^']*)')/i;return a.replace(/<img[^>]*>/gi,function(a){var c=b.exec(a);return null!==c&&c.length>=2?c[2]:""})}function h(a){return a.replace(/<a[^>]*>|<\/a>/gi,"")}function i(a){var b=/(\s+value\s*=\s*"([^"]*)"|\s+value\s*=\s*'([^']*)')/i;return 

Open in new window

0
Revamp Your Training Process
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Hi,

I have been getting the following error when using trying to upload an image:

Server side error
@Big Monty suggested the following:

1:objUpload = Server.CreateObject("Persits.Upload.1")
2:someFormValue = objUpload.Form("someValue")


Which I have done - now I do not get the error but my values come through as blank..

see my code:



<%
'start the file upload 

strDISKLOCATION  = "\\FFtilsmb4012\Apps$\FORSALE\Uploaded_Images"
%>	
	
	<!-- #include file="../../upload/upload.asp" -->
	<%'Create the FileUploader
	Dim Uploader, File, ErrMsg
	Set Uploader = New FileUploader
	' This starts the upload process
	Uploader.Upload()
	
	
	



varQuery=Uploader.Form("query")

	if varQuery="ForSale" then
		varAddType="F"
	elseif varQuery="Wanted" then
		varAddType="W"
	end if

varUserID = Request.ServerVariables("auth_user")


'Retreive the form variables
	
varContact_Name=Uploader.Form("Contact_Name")
varLocation=Uploader.Form("Location")
varTel=Uploader.Form("Tel")
varEmail=Uploader.Form("Email")
varPrice=Uploader.Form("Price")
varBreif_Description=Uploader.Form("Brief_Description")
varFull_Description=Uploader.Form("Full_Description")
varOffers=Uploader.Form("Offers")
varPrice=Uploader.Form("Price")


varTimeStamp = now()
varDate_Expire = DateAdd("d",31,varTimeStamp)

	 dim oRS2339
     Set oRS2339=server.createobject("ADODB.recordset")
     oRS2339.open "FS_HDR", "dsn=FORSALE;uid=web_Admin;pwd=F1nnforest",1,3
     oRS2339.Addnew
     

Open in new window

0
I am getting the following error after completing the form on a contact us web page. This is the error:

ADODB.Fields error '800a0ea5'
Fields update failed. For further information, examine the Status property of individual field objects.
/contactus2.asp, line 33

The email account is on the same server as the webpage and requires authentication. The website was built in asp.



This is the script giving the error:


<%
      'Get Form Variables
customername = Trim(Request.Form("customername"))
email = Trim(Request.Form("email"))
messagetext = Trim(Request.Form("messagetext"))

      'Create and Send E-Mail
Dim objCDOSYSCon
      'Create the e-mail server object
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
      'Out going SMTP server

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "ws.i2hosting.com"
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpaccountname") = "alan@djlhosting.co.uk"
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = “**********”
0
Hello All;

OK, this is code that I found a while back, and posted here.
ASP Classic - Insert text, Line breaks and Code

The issue that I had, or am still having now, is that I am giving the user the option to choose the tags they want to use.
They can have as many tags as they need in their post.

The issue with the code in the link above is that it will only do one tag hard coded.
So, that I have done is added an REGGEX into it, and it works GREAT! for the highlighting,
However, adding this in, has messed up the main function of this code FUNCTION, and that is.
It adds the line breaks to everything OUTSIDE of the Code tags.

The REGGEX that I used and works is this.

Function Reggex(strString, strPattern, strReplace)

	Dim RE: Set RE = New RegExp

	With RE
		.Pattern = strPattern
		.Global = True
		.IgnoreCase = True
		Reggex = .Replace(strString, strReplace)
	End With
	
End Function

fString =   Reggex(fString, "\[code=(.*?)\](.*?)\[\/code=(.*?)\]", "<pre class=""line-numbers"" id=""code""><code class=""language-$1 demo"">$2</code></pre id=""code"">")

Open in new window


The original code is this. (Modified to work in my project)

 	CodeTags(1,1,1) = "[ code=sql]" ' Remove the space between the bracket, 
 	CodeTags(1,2,1) = "[/ code=sql]" ' Remove the space between the bracket, 
 	CodeTags(1,1,2) = "<pre class=""line-numbers"" id=""code""><code class=""language-sql demo"">"
 	CodeTags(1,2,2) = "</code></pre id=""code"">"

Open in new window


This is the entire script.


Open in new window

0
I'm trying to figure out how to merge for example 4 x 2 .JPGs into one .JPG for use on a website automatically.
I use ASP and VB on my server. Any input would be very nice. I know how to do this in a table, but it will not work in my solution as it is a Flash based slider. Thanks in advance.
0
How do I reference an xml object inside a function so that after the function runs the xml object is transformed
per the function code as follows


<%

      set xmldoca = Server.CreateObject(objxml)  

      set sbixmla = xmldoca.createElement("sbixml")
      xmldoca.appendchild sbixmla

      xmlarrA = Array("NodeName1~NodeName2~Attribute1:Value1","NodeName2~NodeName3")
      call objectify(xmlarrA)


Function objectifygen(xarray, targnode)
      set objectifygen = targnode

      for each node in xarray
            set n = objectifygen.createElement(split(node,"~")(1))
            objectifygen.selectsinglenode("//" & split(node, "~")(0)).appendChild n
            if ubound(split(node, "~")) > 1 then
                  for a = 2 to ubound(split(node, "~"))  
                        if split(split(node, "~")(a), ":")(0) = "Text" then
                              n.Text = split(split(node, "~")(a), ":")(1)
                        else
                              call n.setAttribute(split(split(node, "~")(a), ":")(0),split(split(node, "~")(a), ":")(1))
                        end if
                  next
            end if      
      next

End Function

Function objectify(xarray)  
      for each node in xarray  
            set n = xmldoca.createElement(split(node,"~")(1))  
            xmldoca.selectsinglenode("//" & split(node, "~")(0)).appendChild n
            if ubound(split(node, "~")) > 1 then
                  for a = 2 to ubound(split(node, "~"))  
                        if split(split(node, "~")(a), ":")(0) = "Text" then  
                              n.Text = split(split(node, "~")(a), ":")(1)
                        else
                              call n.setAttribute(split(split(node, "~")(a), ":")(0),split(split(node, "~")(a), ":")(1))
                        end if
                  next
      …
0
Greeting,
I have classic ASP connects to an Access database and both resides on a web server W2008 R2 64-bit (IIS 7). In IIS Application Pools->Advanced Settings, the 32-bit applications is set to True and Managed Pipeline mode is Classic.

Below is the connection string in ASP.
Dim objConn
  Set objConn = Server.CreateObject("ADODB.Connection")
  objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
               "Data Source= C:\DB\MyDB.mdb"

This setup was working for years till early this week. The ASP can't connect to database anymore. I have to reboot the server then it worked again for a day then stop. Any suggestions?

Thanks in advance!
0
ASP Script using request from data sent via get can reat using request("data") but if data is sen via post no data is received.

Originated with the get method

http://www.atletasmexico.com/demo/checkout.asp?reference_sale=FE68A77B-AEEA-4976-893C-3706ACCBE7BF&reference_pol=840833038&value=10.

Variables are retrieved and the job get done.

Originated with the post method

http://www.atletasmexico.com/demo/checkout.asp?reference_sale=FE68A77B-AEEA-4976-893C-3706ACCBE7BF&reference_pol=840833038&value=10.

Variables are not retrieved and the script does not work


Any ideas
0
Trying to access an Excel spreadsheet through classic ASP that resides on another server.

If I move the spreadsheet to the local server, everything works as it should.  Once the file is put back in the other server's file share, I get an error.

I have changed the Identity in the application pool to a domain account that has access to the file, folder and share and still get an error that is basically access denied.

I used Process Monitor (systernals) to monitor the file.  I indeed get an access denied error. What confuses me is on the Event tab, it shows that it is impersonating my account (which also has access to the file, folder and share). On the Process tab, it shows the same user as the one I used for the application pool.

My question is this.... If the application pool is using a domain user account that has access to a file, and it is impersonating another user that also has access to a file, why am I getting am Access denied error?

Thank you for your time.
1
Hi experts, I wish to align two div in one line. I have here 3 div one is the mother and the other two are  the children. My codes below didn't work. I need to align the two child-div in one line. Any help please!

<!DOCTYPE html>
<html>
<head>
<title>Text2Go</title>
<link rel="stylesheet" href="iStyle.css"/>
</head>
<meta charset="utf-8" />

<body>
<div class="stay">
            <div id="my7" class="stay-son1">  
               <p>Part1</p>
            </div>
            <!--2nd-->
            <div id="my8" class="stay-son2">  
               <p>Part2</p>
            </div>
</div>
</body>
<script>
$('#body').css('min-height', screen.height);
</script>
</html>

Open in new window



#body {
height: 100%;
width: 100%;
}
div.stay
   {
    line-height:35px;
    height:100%;
    width:100%;
    float:center;
    font-size: 100%;
    background-color:#33FF66;
    margin: 0px 0px 0px 0px;
    border: 1px solid #73AD21;
   }

div.stay-son1
   {
    line-height:35px;
    height:100%;
    width:50%;
    float:center;
    font-size: 100%;
    background-color:greenyellow;
    margin: 0% 0% 0% 0%;
    border: 1px solid #73AD21;
   }
div.stay-son2
   {
    line-height:35px;
    height:100%;
    width:50%;
    float:center;
    font-size: 100%;
    background-color:grey;
    margin: 0% 0% 0% 0%;
    border: 1px solid #73AD21;
   }

Open in new window

0
Free Tool: Site Down Detector
LVL 9
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.

As the title says...  WS is running ASP and MS SQL.

It would be nice if I could just construct a QueryString something like..

www.mysite/postpage.aspx?table=customer&id=1234&name=fred

Open in new window


Is there some existing class to help with this serverside ?
Also can I encrypt the QueryString somehow ?

Thanks
0
Hi experts, I wish to put on an alert the particular field is having an error. Thank you!
	if ((pcode=="") || (pname =="") || (dptid =="") || (um =="")) 
	  {
	  alert(); //The alert should know which one of the four is getting error.  
	  return false;
	  }

Open in new window

0
HI experts, I wish the code below would run to Internet explorer browser. The code will only run in Firefox. Thank you!

<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>

<input type="text" id="number">

<script>
var elementInput=document.getElementById('number');
elementInput.addEventListener('keypress', function(e)
{
    if( !e )
    {
       e=window.event;
    }
    var key = e.keyCode ? e.keyCode : e.which ;
    alert(key + " " + String.fromCharCode(key) );
});
</script>


</body>
</html>

Open in new window

0
Hi experts, I want to save dat file locally. Is this possible that the client side could save dat file? If not please give me  idea why? Thank you!

<!doctype html>
<html>
<body>
<form action="save.asp" method="post">
    <label for="textboxdata">Enter a message</label>
    <textarea id="textboxdata" name="textboxdata"></textarea>
    <input type="submit" value="Save locally"/>
    <p>
        <label>Name of the Dat</label>
          	    <input ype = "text"
                 	        id = "mydatName"
                 	    value = "fortune"
                            name="filename"
			            size="10"
                </
    </p>
</form>
</body>
</html>

Open in new window

0
I have a SharePoint Custom List Application that in some cases could go

Examples:
Dashboard.aspx has a link that calls Editform_Gates.aspx with the following passing parameter values for record ID and SOURCE
EditForm_Gates.aspx?ID=14169&RAPT=NG2710&SOURCE=Dashboard.aspx

The EditForm_Gates.aspx then has a couple links that call other pages to add/update children associated records
NewGate_5000.aspx?mID=14169&SOURCE=EditForm_Gates.aspx?ID=14169 or
EditGate.aspx?ID=73671&SOURCE=EditForm_Gates.aspx?ID=14169

The problem I have is once you get to that third deep code if you hit cancel or save it does go back to the second page the EditForm_Gates.aspx but from there if you hit cancel or back it loses the SOURCE= from the first call and does not know where to go..

What is the proper way to do this and if any samples or examples are out there I would greatly appreciate it.

Thanks in Advance
0
I need to get my IPN of mercadopago (Mexico) working.. The IPN url keeps saying response is not 200 or 201 as required I ahve tried with http and https wih an empry url and nothing seems to work.  It is in asp
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.