asp-classic

Specifying decimal places on a variable in a string

好久不见. 提交于 2019-12-08 00:27:39
问题 after briefly looking for a few hours I see multiple solutions to my problem but I am struggling to implement them and hopefully someone can help a noob. The issue is that I have a drop down box in an ASP/MySQL web application that displays a few prices incorrectly. e.g if the data is 32.00 the figure displayed will be returned as 32, similarly if it 6.50 it displays as 6.5 The data type or the price is set to Decimal(19,2) length in the db table, and the price shows correctly elsewhere

How to pass parameter to Url with Python urlopen

浪尽此生 提交于 2019-12-08 00:08:27
问题 I'm currently new to python programming. My problem is that my python program doesn't seem to pass/encode the parameter properly to the ASP file that I've created. This is my sample code: import urllib.request url = 'http://www.sample.com/myASP.asp' full_url = url + "?data='" + str(sentData).replace("'", '"').replace(" ", "%20").replace('"', "%22") + "'" print (full_url) response = urllib.request.urlopen(full_url) print(response) the output would give me something like: http://www.sample.com

Classic ASP TLS 1.2 issue

佐手、 提交于 2019-12-07 22:01:28
问题 I'm working with a classic asp script that I inherited. I'm trying to connect with TLS 1.2, but am having issues. I get a 500 Error when I try to run the following: <% Const WinHttpRequestOption_SecureProtocols = 9 Const SecureProtocol_SSL2 = 8, SecureProtocol_SSL3 = 32, _ SecureProtocol_TLS1 = 128, SecureProtocol_TLS1_1 = 512, _ SecureProtocol_TLS1_2 = 2048 Set objHttp = Server.CreateObject("WinHTTP.WinHTTPRequest.5.1") objHttp.option(9) = 128 objHttp.open "GET", "https://howsmyssl.com/a

How to test for an empty SQL result in ASP

两盒软妹~` 提交于 2019-12-07 20:53:58
问题 I am running a query from ASP using a MySQL database, I want to create a variable (ssResult) based on the result with a person's name (fullname), if the record does not exist I want to assign the text 'N/A' to the variable, code below, I currently use a function getOther for my database connections which passes the column name "fullname": ssResult = getOtherElse("SELECT fullname FROM table WHERE id=" & inArr(j), "fullname") Below is the code for the function getOtherElse which only works when

Converting a fairly simple C# Class library into a COM object?

别来无恙 提交于 2019-12-07 19:18:11
问题 Here's my problem: I have to call a web service with a secure header from a classic ASP page that returns a complex data type. For various reasons concerning a 3rd party tool it has to be classic ASP. We decided that I should create an external dll to do this - which I did (in c#) so it returns a dataset (Something ASP can understand). However now I need to expose that function to the ASP page. Because this is classic ASP I think the only straightforward way to do this is to expose this class

ASP Classsic - Insert into Excel .XLS columns or Create a Real Excel Format File

☆樱花仙子☆ 提交于 2019-12-07 18:35:42
问题 I would like to add my MS SQL data into the Excel .XLS file below. I tried the following: <% Response.Clear Response.Buffer = False Response.ContentType = "application/vnd.ms-excel" Response.AddHeader "Content-Disposition", "attachment;filename=example.xls" ' --OPEN MS SQL DATABASE CODE-- ' --OPEN RECORDSET CODE-- %> <table> <tr> <th>DEBNAME</th> <th>INV_ID</th> <th>INV_DATE</th> <th>PO_NO</th> <th>INVAMT</th> </tr> <% 'START OF: ROW LOOP Do Until objRS.EOF %> <tr> <td><%=objRS("DEBNAME")%><

Populate Dropdown from SQL in Classic ASP

▼魔方 西西 提交于 2019-12-07 18:17:20
I am trying to force users to only select certain values when adding a record. So naturally I am using a dropdown, but I'd like the options to be populated by a specific field in the database. I figured I'd do a Do/Loop but I am apparently doing something wrong. Dim dstrSQL Dim drs dstrSQL = "SELECT EventID FROM Events" set conn2 = CreateObject("ADODB.Connection") conn2.open CONN_STRING set drs = conn2.execute(dstrSQL) conn2.close: set conn2 = nothing Do Response.Write "<option value=" & drs.Fields(0) & " >" & drs.Fields(0) & "</option>" drs.MoveNext Loop It's been a long time. Something like

Password encryption/decryption between classic asp and ASP.NET

杀马特。学长 韩版系。学妹 提交于 2019-12-07 18:12:48
问题 I have 2 websites: one written in classic asp and another written in ASP.NET (1.1 framework). Both applications use a login mechanism to validate user credentials based on a shared database table. Up to now passwords are stored in a 1-way MD5 hash, meaning people must be given a new generated password if they lose the old one. I now want to change this and make the passwords decryptable. I found this Rijndael code to use with classic asp: http://www.frez.co.uk/freecode.htm#rijndael But I

Japanese/Chinese language data in SQL Server table

一个人想着一个人 提交于 2019-12-07 16:37:46
问题 So I've got an interesting problem that I need help with faster than I can get my skills with SQL Server up to par. We have a table that contains a bunch of text, all of it in different languages. Most of this data appears correctly in the browser, however, anything in Chinese or Japanese gets completely mangled by the browser. This is an ASP.old app that we're using to display the data which comes from a server running MS SQL Server 2005. Before, we had this same problem and we solved it by

Using ASP/VB to get value of a node attribute

蓝咒 提交于 2019-12-07 16:17:34
问题 I have the following XML schema: <lyrics> <response code="0">SUCCESS</response> <searchResults> <result id="120745" hid="gXTQx5ywE0M=" exactMatch="true"> <title>Opera Singer</title> <artist> <name>Cake</name> </artist> </result> </searchResults> </lyrics> Using VB, how would I get the value of exactMatch ? I have tried many different methods, but nothing seems to work. Any ideas? 回答1: Try this: Set xmldoc = Server.CreateObject("Microsoft.XMLDOM") xmldoc.async = true xmldoc.Load Server.MapPath