asp-classic

ASP error "Key column information is insufficient or incorrect." when updating mySQL

I have the following subroutine in a classic ASP class that calls the ADO UPDATE method. I'm using mySQL db using ODBC driver 5.1. If I all the subroutine I get the following error: Microsoft Cursor Engine error '80004005' Key column information is insufficient or incorrect. Too many rows were affected by update. Public Sub Update(tab...

Side effects of not including CommandType for dynamic sql?

What pitfalls may I encounter by not setting the cmd.CommandType attribute when running a dynamic sql call? I can not use adovbs.inc, and using cmd.CommandType = 200 yields the error: ADODB.Command (0x800A0BB9) Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. So by commenti...

Catch Timeout expired from ASP

Hello I have a ASP site (with VBScript) that connects to a SQL 2005 database. I would like to be able to catch the timeout expired error, through the err object, but I cannot manage to find any documentation that tells me the err.number for timeout expired. Can you help me with this one? ...

Add data into database using IF Statement

Hi there, I would like to add data into database using if statement which based on certain condition..but my codes below doesn't work..need your advise. <% If (rs_view.Fields.Item("CGPAOverall").Value>="2.00") Then %> rs_view("Status")="Proceed" <% Else %> rs_view("Status")="Stop" <% End If %> I would like to save the result direc...

Accessing COM Component from Classic ASP which consumes WCF throwing error

I created a COM interop component using ClassLibrary which consumes WCF. Now when I call COM component's Method (which uses WCF) from my Classic ASP page, I'm getting the following error. Error Type: System.ServiceModel (0x80131509) Could not find default endpoint element that references contract 'DLSWS.IDLSWS' in the ServiceModel clien...

Classic ASP App CINT failure - twitpocalypse v2

Due to a qty value exceeding what a VBScript INT can store, I'm getting a pretty nasty error message (actually the users are)... This is totally a case of twitpocalypse. Since CINT() will not work in this situation, what is the best workaround? requestqty = 40200 CInt() max = 32767 CInt(requestqty) EDIT CLng() seems to do the ...

Export data to excel file from Classic ASP failing

I'm trying to export a record set into Excel but it seems to keep failing on the production servers. However, it seems to work just fine on my development workstation. I'm wondering i fit's a server related issue but I have other apps that can export just fine using the same exact code, well similar code same set up. <%@ Language=VBScr...

Classic ASP Store objects in the session object.

Hi All, I am new to classic ASP and I need to code a web application in classic asp because the customer wants it to be in classic asp. :( Anyways! here is my question: When I have a object of a class called person: Class Person Private m_sFirstName Public Property Get firstName firstName = m_sFirstName End Property Public Pro...

classic asp, excel, stop leading 0 (zero's) from being removed

Hi, I'm populating an excel worksheet with the results of a query. In the results set is a 'Description' field which can basically have anything in it, including numbers prefixed with leading zero's, such like 0000234. The problem is that in writing them to a cell, the leading zero's are getting knocked off, so in the case above I end...

how to format line so that I end up with ="08075"

Hi, how many " (double quotes) do I put around this line so that I end up with ="08075" being pasted into my excel worksheet? The line is: Response.Write vbTab & ResultSet(8,r) I need and '=' sign with a single quote before the ResultSet(8,r) with a closing double quote after... I tried: Response.Write vbTab & "="" & ResultSet(8,r)...

Error Handling in Classic Asp without timeout error

In classic asp page, i need to catch the error description and insert into a table in the database. when i use 'on error resume next', i am getting a timeout error as follows: The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTime...

where does asp and iis 6.0 get its date format

I've found a dilly of a pickle with a new web server. We have a new web server that is displaying dates differently than our old web servers. We are running asp classic web pages on IIS 6.0 with windows server 2003. We have logged in as an administrator and set the regional settings as appropriate and then applied the settings to curr...

IE7 Classic ASP Cache

I have a classic asp website that uses Session variables to store login state ie. userid, isloggedin, etc. On logout, the session variables are reset and Session.Abandon() is called followed by a redirect to the login page. In IE7 I have noticed that after logout I can type in a previously visited url and see what appears to be a cached ...

Product Cart - > Moneris: two currency

We are attemption to customize the script to allow Canadian clients to process orders in CND dollars and all other clients to process orders in USD; however, we cannot authenticate with Moneris. Why is this script not authenticating? we have modified 1 file. gwMoneris2.asp - there we do the switch between gateway accounts depending of ...

Classic ASP using COM+ on x64 Windows Server 2008 and IIS7

(Note: I thought about posting this to serverfault, but I figured more developers have banged their heads against these issues than admins) I'm trying to set up a web page that uses both ASP Classic and ASP.NET 2.0 in the environment mentioned above. After applying many common fixes on the web and a few lucky guesses, the ASP.NET 2.0 pa...

Classic asp - 64 bit MDAC reference problem

hi, I got an very basic test.asp page that needs to run on a 64-bit server first i tried <!--METADATA TYPE="TypeLib" NAME="Microsoft ActiveX Data Objects 2.5 Library" UUID="{00000205-0000-0010-8000-00AA006D2EA4}" VERSION="2.5"--> <% .... more code does not work (even though i found the reference in COM) the i try <!--METADATA ...

Error declaring a variable, What Im Doing wrong

I'm declaring a string variable this way in classic ASP: Dim i As String And getting this error: Microsoft VBScript compilation error '800a0401' Expected end of statement /retencion/Estadisticas/Detail.asp, line 10, column 6 Dim i As String -----^ Why is that? ...

How to handle the End Request event in class ASP

In ASP.NET there is the Application_EndRequest event in global.asax. In classic ASP however there is no such equivalent event in global.asa Is there any other built in way of handling the end request event, or any way of somehow hooking into IIS to accomplish the same thing? Thanks ...

How to convert this php script to classic asp

Hi all, I am trying to convert a PHP/JQuery sortable drag and drop script. I want to add JQuery sortable functionality to a site I have that is written in Classic ASP. Here is a scaled down version of the script: <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.7....

Classic ASP VBScript offline reference

I don't do a slew of VB in classic ASP, so I'm looking for an offline reference I can use while I'm well...offline. General syntax and ADO goodies are a plus! Thanks in advance! ...