asp-classic

Zipping a folder using 7-Zip from an asp page

北城以北 提交于 2019-12-24 09:33:07
问题 I am trying to zip a folder from an asp page. This is my code: zipFolderName=folderName &"Zipped.zip" command="cd C:\Program Files\7-Zip & " command = command & "7z a -tzip " & zipFolderName & " """ & folderName & """" Response.Write command set objshell = Server.CreateObject("WScript.shell") objShell.exec (command) set objshell=nothing The command that is written in the Response.Write is cd C:\Program Files\7-Zip & 7z a -tzip D:/saveAll/DocumentsZipped.zip "D:/saveAll/Documents" When I run

Reading multiple recordsets

二次信任 提交于 2019-12-24 09:30:17
问题 I have a Stored proc which returns 6 select statement results. I'm trying to use one record set to execute sp and get records for each select statement but i get 0 or empty records when i read them, How can i query record set with multiple select statements from stored procedure? ex: Set rs = Server.CreateObject("ADODB.Recordset") strSql = "Exec [dbo].[xyz] '"&param1&"', '"&param2&"', '"&param3& "'" rs.open strSql,CN,3,3 Do While Not rs.EOF if rs.recordcount > 0 then r1 = rs.GetString(, , ",

get a only string from soap Response in classic asp

谁说我不能喝 提交于 2019-12-24 08:55:51
问题 I have write xml code for requesting web service I am getting proper response like: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <getOrderFileResponse xmlns="http://www.edocbuilder.com/"> <getOrderFileResult>**string**</getOrderFileResult> </getOrderFileResponse> </soap:Body> </soap:Envelope> I want only string from

How can I append a child node to an element in a DOM object?

◇◆丶佛笑我妖孽 提交于 2019-12-24 07:37:54
问题 <% Set xmlDoc = Server.CreateObject("MSXML2.DOMDOCUMENT") xmlDoc.loadXML( "<response />" ) Set node = xmlDoc.createElement("account") xmlDoc.documentElement.AppendChild node Set node = xmlDoc.createElement("type") node.Text = "TheType" xmlDoc.documentElement.AppendChild node Set node = Nothing %> This creates an XML doc that looks like the following: <response> <account></account> <type>TheType</type> </response> How do I append the "type" node as a child node to the "newaccount" node so that

Classic ASP, Sending E-mail error '8004020f'

。_饼干妹妹 提交于 2019-12-24 07:10:23
问题 I am getting error, when I send a mail error '8004020f' /sis/mail.asp, line 168 Here my code. Set cdoConfig = Server.CreateObject( "CDO.Configuration") cdoConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 cdoConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="mail.dartconsulting.info" cdoConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25 cdoConfig.Fields.Update Set cdoMessage = Server.CreateObject

Array from Request.Form in classic asp [duplicate]

拥有回忆 提交于 2019-12-24 07:10:05
问题 This question already has an answer here : String to Array with Classic ASP (1 answer) Closed 2 years ago . EDIT: I now realise after the help from those who replied that my question was about whether Request.Form Data is a string in the same way that a$="FooBar" is a string and the Array command in Classic ASP. I'm trying to make an Array from data submitted in a Form. The form fields are dynamically created and have the same name "subj". The Response.Write(Request.Form("subj")) produces:

Using VBScript function in JScript when Language=VBScript

百般思念 提交于 2019-12-24 06:51:50
问题 I know it is possible to use functions coded in VBScript if language="JScript" as follows : <%@ language="JScript" %> <% Response.Write(myFunc()); %> <script runat="server" language="vbscript"> Function myFunc myFunc="test" End Function </script> However, before refactoring a script in JScript, I wanted to know if, assuming the language is set to be VBScript, is there still a possibility to use VBScript functions in the JScript. Or, in that case, only the other way aroud is possible. Thanks!

Using VBScript function in JScript when Language=VBScript

你离开我真会死。 提交于 2019-12-24 06:51:49
问题 I know it is possible to use functions coded in VBScript if language="JScript" as follows : <%@ language="JScript" %> <% Response.Write(myFunc()); %> <script runat="server" language="vbscript"> Function myFunc myFunc="test" End Function </script> However, before refactoring a script in JScript, I wanted to know if, assuming the language is set to be VBScript, is there still a possibility to use VBScript functions in the JScript. Or, in that case, only the other way aroud is possible. Thanks!

Classic ASP ADO.PARAMETER Mapping to Oracle 10g NUMBER datatype

此生再无相见时 提交于 2019-12-24 06:50:07
问题 I have an Oracle 10g database with a field defined as NUMBER. I am converting a classic ASP (vbscript) from inline sql to parameterized. I cannot get the ADO.PARAMETER to map to a NUMBER. All I get is "Parameter object is improperly defined. Inconsistent or incomplete information was provided." I've tried decimal, numeric, with precision and scale, int, bigint, varchar, sizes and everything combination I can think of. Dim param Set param = Server.CreateObject("ADODB.Parameter") param.Type = ?

SQL Query to find matching values based on user input

江枫思渺然 提交于 2019-12-24 06:47:08
问题 I'm building a website for property agents and tenants. Tenants can sign up and fill in their desired locations for properties, including Street, Town and Postcode. Once they sign up, this automatically emails agents who have properties that match those search criteria. At present I have the query set up as follows so that it matches on either the Street, Town or Postcode. <% Dim rspropertyresults Dim rspropertyresults_numRows Set rspropertyresults = Server.CreateObject("ADODB.Recordset")