asp-classic

This key is already associated with an element of this collection.

I have the following code: If Not Application("ServicesQueueActiveDict").Exists( nID ) Then 'we are good to process, this item is not Active....add it now Application("ServicesQueueActiveDict").Add nID, Now Else 'do whatever The "ServicesQueueActiveDict is a caprock.dictionary. I get the error referenced in this subject, "T...

This type of page is not served when accessing an asp page in debug mode in Visual Studio 2008

I am trying to debug an old project in Visual Studio 2008. When I go to an asp page I get the following. Server Error in '/website' Application. This type of page is not served. Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.asp' may be incorrect. Please revi...

List/Menu Searching

Firstly I'm really newbie in programming and now I want to develop system using asp but I got problem to create searching. What I want is searching by date. When user select Feb (start) - Nov(end) then report will display below. engine -use dreamweaver database - SQL Server SQL for column select from column month and column year Real...

Show EMF File in IE 8

Hi, i would like to show some (about 5 to 10) EMF (Enhanced Metafile) Files in the IE 8. I use ASP to get all Files from a defined Folder and show them with the <img src=""> Tag. Some of the IMages are really big, so tried to reduce the size by setting its height to 100. Is this the correct way? The Images load very slow and not all ima...

Regex removes code from between "<" and ">"

I have an issue where I need to find a string in a file, but when I run the regex.match function it returns the string without any text between "<" and ">" missing. Here is my code and the string returned Original string - [$iif{len("Test")>0,<meta name="Author" content="Test">,""}$] regex Pattern - \[\$[a-zA-Z_0-9\{\}\(\)<>=\|/\."",...

How to return a database connection from a function?

I need to modify some legacy code that was written in classic ASP (VBscript). I have a line that sets a database connection like this: set m_conn=OpenConn() I believe that the OpenConn() function is in a DLL somewhere. This is bad news because we can't locate the source for that dll. So, I've been working on a replacement for that fu...

SQLServer 2008: Showing the Information with Money DataType in Classic ASP

Hi All, I am using MS SQL 2008 to develop one system with Classic ASP. I want to show 3 Decimal Places the field Datatype is money. I got answer from this http://www.sqlusa.com/bestpractices2005/moneyformat/ . I use like this in my SQL Statement : CONVERT(VARCHAR, CAST(Sell_Price AS Decimal(19, 3))) AS Unit_Price What I w...

Session in classic ASP

Hi! I'w working on a project in classic ASP and I want to add, for example, some users for a temporary list and when I submit the form, this data will be save to DB. I know how to work with this in asp.net, but not in classic asp. Is it possible to create lists of users, for example, and manage this in a session? thanks! ...

Classic ASP's Application Variables disappearing

I've got a classical ASP website in which I store some information inside the Application object. These variables seems to disappear every now and then. I am wondering what could be wrong. Any ideas? ...

Don't understand "Object required" error

I have the following ASP classic function: function get_children(n) dim local_array dim parent dim path if n.hasChildNodes() then for each child in n.childNodes local_array = array_merge(local_array, get_children(child)) next else set parent = n.parentNode while isobject(parent) path = parent.nodeNa...

Classic ASP Ubound returns 9 getting subscript out of range

Sorry if this has been covered, I couldn't find anything specifically to this issue in my searches. I am trying to debug a classic ASP application. I need to print the session variables, one of which is an array. My code is below, I keep getting Subscript out of range, usually this means that the array is empty (Ubound returns -1) but i...

How do you integrate Classic ASP with ASP.NET application?

I have an old Classic ASP application. Now the users wants to have some enhancements on it. I have no working experience in Classic ASP. I want to do the enhancement in ASP.NET which i am very fluent. Can i do it? All i wanted is provide a link in ASP page and once the user clicks on that link, i want to open an ASPX page as a popup win...

Get bookmark value from URL calling classic ASP

Hi, If I'm calling for example, http://www.mysite.asp?p1=2&amp;p2=3#Bookmark Does the browser invoke that #Bookmark after the "classic" ASP generates output? It appears that it's not coming thru, the browser doesn't jump down to the bookmark. I am suspicious it's getting "thrown out" by either ASP or the browser. This acts the same o...

VBScript Converting XML Data to an ADODB RecordSet

I have a situation in which I need to dump XML into an ADODB Recordset in VBScript. My XML is in the form below. What I would like to do in my code is convert the XML into a recordset with AddressObject rows. The code below I tried but keep running into one DomDocument error after another. Can anyone please help me with a solution for th...

Classic ASP RegExp small change

Hi, I have some regular expression code that grabs the data between the title tags on a page: <% Function UrlExists(sURL) Dim objXMLHTTP Dim thePage Dim strPTitle Dim blnReturnVal Dim objRegExp Dim strTitleResponse 'Create object Set objXMLHTTP = CreateObject("MSXM...

Help passing XML String to RecordSet

What I would like to do is dump an XML String into RecordSet. The problem I am having is that the code seems to work fine if I saved the XML String first to a file and then read from the file which I think is redundant. However, when I want to read from string, I get the error RecordSet cannot be created. Source XML is incomplete or in...

Convert ASP code using Chr(13) to PHP

Hi, I am trying to move a old Classic ASP site to run in PHP. I am rewriting bits of it, however I have come across the following function that is causing me some problems. Basically the function FixForSQL is run on everything before adding it to the database and then FixForHTML is run on data returned with a SQL query to format it for d...

Can a VBScript function return a dictionary?

I have a dictionary of form data that I want to modify using a function. function queryCleanForm(myDictForm) dim arrayKeys arrayKeys = myDictForm.keys for i=0 to myDictForm.count-1 myDictForm(arrayKeys(i)) = replace(myDictForm(arrayKeys(i)), "'", "''") response.write myDictForm(arrayKeys(i)) next q...

IE and problem with clearing session

Hi I have problem with clearing session only in IE browser (I've tested in different version IE (IIS 6 and 7) - it works good in Firefox and Opera). I have 4 small scripts (I show code for better explanation, where I have problem): 1. default.asp - it only show session value: <%@LANGUAGE="VBSCRIPT"%> <% Session.Timeout=60 Response.Wr...

ADO Persistent XML to RecordSet Problem

I need to Convert my XML Data to an ADO RecordSet. I am able to construct the ADO Persistant XML format for the conversion but I am not too sure why the single row in my XML is being ignored. The final recordset produced has EOF and BOF both as true, and RecordCount is 0 but that is incorrect since my XML does contain at one row as in th...