asp-classic

How to remove duplicates from an array?

偶尔善良 提交于 2019-12-11 04:18:22
问题 I am trying to remove duplicate values from an array. I came across this solution: http://www.livio.net/main/asp_functions.asp?id=RemDups%20Function It works fine if I hard code an array, via e.g. theArray = Array("me@me.com","sid@sid.com","bob@bob.com","other@test.com","other@test.com","other@test.com") The duplicates are removed via the test steps shown on the livio.net page: '--- show array before modifications response.write "before:<HR>" & showArray (theArray) '---- remove duplicate

Locating the source DLL behind a COM+ ProgId

假装没事ソ 提交于 2019-12-11 04:17:49
问题 I've never really had to debug Classic ASP, so this is a little rough and most likely a poor question, but I have done as much research as I could before asking. I have a request to identify what code prints to a printer, and re-use that code in a new page that someone has built. While trying to identify that, I've stumbled on a few things that I don't understand, but namely one big one. The gist is, people can order cookies from the cafeteria, and when they submit, it shows a confirmation

FileSystemObject - Unsupported filename characters

吃可爱长大的小学妹 提交于 2019-12-11 04:09:22
问题 Is there a function I can use that converts dodgy filenames with good filenames? I'm processing a large amount of photos, and very occasionally, my script stops because the uploader has put a curly symbol (~) in the filename. I'm also now wondering if there are any other bad symbols that can't be in a filename and how to escape them. I'm looping through these files using VBScript's FileSystem Object, similar to the following: For Each File In Files If InStr(UCase(File.Name), ".JPG") > 0 Then

Open, Edit and Re-Save a CSV file

半城伤御伤魂 提交于 2019-12-11 04:09:18
问题 I have a .CSV like file that I would like to do one of the two things to it. The data in the file looks like this: "BRANCH","CARD","BILL_TYPE","AUTH_CODE","INVOICE","UNIT","EMP_NUM","TRIP","TRAILER","HUB/SPEED","VEH_LICENSE","DRIVER","DATE","TIME","CHAIN","IN_NETWORK","TS#","TS_NAME","TS_CITY","TS_STATE","PPG","NET_PPG","FUEL_GALS","FUEL_AMT","RFR_GALS","RFR_AMT","CASH","MISC","INV_TOTAL","FEE","DISC","INV_BALANCE",1.00,1.00,"E","004ACS","02812","365","-","-","0",0.00,"-","JOHN S ",11/4/2013,

Win 2012R2 Server - ActiveX component can't create object aspmail 4.0 (SMTPsvg.Mailer) IIS8.5

若如初见. 提交于 2019-12-11 04:08:42
问题 I've had to move a classic ASP application from windows server 2008 to Windows Server 2012R2 and the app uses a com object called (aspmail 4.0) from a company called ServerObjects - which is no longer in business (at least there's no way to contact them). Anyway, I've registered the DLL ( C:\Windows\SysWOW64\regsvr32.exe d:\components\aspmail4\smtpsvg.dll ), that works as I checked the registry (it's 100% installed no issues nor errors). I've verified the DLL is correct and the registry is

Classic ASP do while loop showing error

无人久伴 提交于 2019-12-11 04:05:57
问题 I have a classic ASP page with a simple html table, and I want to loop the table rows based on a unknown number of records pulled from the database, however, when I am looping the records with a do/while loop, I am getting an error saying that Either BOF or EOF is True. I want every other row of the table to alternate background colors (the colors I have set in CSS). <% do while not rsTest.eof %> <tr class="odd"> <td colspan="5"><%=(rsTest.Fields.Item("field").Value)%></td> </tr> <% rsTest

Trapping Object required: '[object]' with MSXML2.ServerXMLHTTP.6.0

邮差的信 提交于 2019-12-11 04:02:57
问题 I am using the Flickr API and MSXML2.ServerXMLHTTP.6.0 to read the XML response. For example: https://www.flickr.com/services/rest/?method=flickr.photos.search&api_key=[mykey]&text=cheese&per_page=1&sort=relevance&min_upload_date=2010-05-25 Returns: <rsp stat="ok"> <photos page="1" pages="847622" perpage="1" total="847622"> <photo id="8658999887" owner="46248160@N04" secret="13e2615193" server="8123" farm="9" title="cheeses" ispublic="1" isfriend="0" isfamily="0"/> </photos> </rsp> I do some

How to read NCLOB, CLOB data values from Oracle database using Classic ASP pages?

爱⌒轻易说出口 提交于 2019-12-11 03:58:52
问题 I am getting the following error: Microsoft OLE DB Provider for Oracle: Data type is not supported. Could somebody help me figure out this please... Situation: Recently migrated database from SQL Server 2005 to Oracle 11g. One of the table has some columns of the data type ntext in SQL Server, which were converted to NCLOB during migration to Oracle. Client is Classic ASP page (VBScript) accessing the Oracle Database through OLEDB connection. When the execution reaches the query (Select query

How do I secure a folder used to let users upload files?

雨燕双飞 提交于 2019-12-11 03:55:39
问题 I have a folder in my web server used for the users to upload photos using an ASP page. Is it safe enough to give IUSR write permissions to the folder? Must I secure something else? I am afraid of hackers bypassing the ASP page and uploading content directly to the folder. I'm using ASP classic and IIS6 on Windows 2003 Server. The upload is through HTTP, not FTP. Edit: Changing the question for clarity and changing my answers as comments. 回答1: also, I would recommend not to let the users

Does many include's (in “case”) in ASP classic hurt the performance of the server?

。_饼干妹妹 提交于 2019-12-11 03:54:54
问题 I want to build this page with ASP classic: <% Dim depart depart = 1556 Select Case depart Case 1 %> <!--#include virtual="/check/noam/newDesign/test1.asp"--> <% Case 2 %> <!--#include virtual="/check/noam/newDesign/test2.asp"--> <% Case 3 %> <!--#include virtual="/check/noam/newDesign/test3.asp"--> <% Case 4 %> <!--#include virtual="/check/noam/newDesign/test4.asp"--> <% Case 5 %> <!--#include virtual="/check/noam/newDesign/test5.asp"--> <% Case 6 %> <!--#include virtual="/check/noam