asp-classic

Session in classic ASP

对着背影说爱祢 提交于 2019-12-07 01:33:29
问题 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! 回答1: yesa, you can use this, or the application state. one thing do note, you cant save objects in it, so you'll need to do some serialization if you want to store any complex

Is there an OR/M for Classic ASP?

谁都会走 提交于 2019-12-07 01:21:05
问题 Is there an OR/M (object relational mapper) that can be used in Classic ASP? Even a simplified class object would be a great help in handling simple CRUD tasks. Yes I know ASP.NET has many and I use a few of them for ASP.NET sites. However this is a legacy e-commerce site that uses ASP/VBScript and a total rewrite it not a possibility. 回答1: You could use .net through COM Interop, and do your ORM in .net. Another option would be to use Code Smith, or MyGeneration and generate VB6 classes. Here

Submitting to Twitter with Classic ASP

时光毁灭记忆、已成空白 提交于 2019-12-07 01:20:39
I am trying to implement twitter posting on a website. when a user posts an alert and they check off "submit to twitter" I want to send the contents of the box (140 chars of it) to the associated twitter account. So I've done the following: Registered a new app in twitter Gotten all of my tokens/keys Set up the following library: http://scottdesapio.com Changed all of the parameters per the instructions Every time I try to submit, though, I'm getting an "Could not authenticate with OAuth" error. I'm trying to do this all in one go, so I'm not grabbing the token from twitter but filling in both

ASP - Printing the entire request contents

百般思念 提交于 2019-12-07 00:48:23
问题 I'm debugging some ASP code and I need to get a quick printout of the current Request datastructure, which I believe is an array of key/value pairs. I see that Request.Form("key") is the method for extracting individual elements. Any tips on printing out the entire thing? 回答1: Try this For Each item In Request.Form Response.Write "Key: " & item & " - Value: " & Request.Form(item) & "<BR />" Next 回答2: Try a FOR/EACH loop: for each x in Request.Form Response.Write(x) Next 回答3: Working: For x =

Can a VBScript function return a dictionary?

。_饼干妹妹 提交于 2019-12-06 23:36:36
问题 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 queryCleanForm = myDictForm end function The problem is the line queryCleanForm = myDictForm errors as Wrong number of arguments or invalid property assignment Is there a way to do this in VBScript?

How to get the insert ID from this ADODB.Recordset?

喜夏-厌秋 提交于 2019-12-06 21:47:00
问题 I'm trying to avoid using straight SQL queries in my web app. I looked around and have come to the conclusion that ADO Recordset s would be the best or at least safest tool for the job. I need to insert records into a database table. Unfortunately I'm at a loss as to how to get the identity value for the record which was just inserted. Here's a reduction of what I've got now: <% dim insertID, rs set rs = Server.CreateObject("ADODB.Recordset") rs.Open "my_table_name", conn, adOpenForwardOnly,

MySQL ODBC Issue: Data source name not found and no default driver specified

六眼飞鱼酱① 提交于 2019-12-06 21:32:25
I'm currently trying to run a classic ASP application which I've been given source code for. I want to set up on my 64bit Windows 7 dev machine and am having trouble with an ODBC based data connection to a MySQL instance. I'm seeing the error: Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified /includes/<File Name>.asp, line 100 What I've tried: The connection is DSN-less. The application is running under IIS app pool with local system permissions. w3wp.exe can be seen running under NT

HTTP/1.1 New Application Failed

二次信任 提交于 2019-12-06 18:46:10
问题 i just moved from my old host to Godaddy, which seems to be a worst web host with no support. i moved my asp website (written in classic asp) to the new godaddy windows hosting. but when i run the site i get the below error HTTP/1.1 New Application Failed this site worked perfectly with my previous host. below is what i have in my web.config file <?xml version="1.0"?> <configuration> <system.webServer> <httpErrors errorMode="Detailed" /> <asp scriptErrorSentToBrowser="true"/> </system

Outputting a GUID in VBScript ignores all text after it

夙愿已清 提交于 2019-12-06 18:28:19
问题 I'm creating a GUID for use in a Classic ASP application, by using TypeLib. However, even a simple test such as writing the GUID out to the screen is giving me problems - it prints the GUID but ignores everything after it (e.g. HTML tags, additional words, anything). Here's the rudimentary code to test this: Set typeLib = Server.CreateObject("Scriptlet.TypeLib") myGuid = typeLib.Guid Response.Write myGuid & " is the new GUID" Set typeLib = Nothing This will display something like {9DDB27D1

CDO.Message .Send causes script execution timeout

ぐ巨炮叔叔 提交于 2019-12-06 16:49:25
I have the following code: Set myMailanon = CreateObject("CDO.Message") myMailanon.MimeFormatted = True Set myConfanon = Server.CreateObject("CDO.Configuration") Set objBPanon = myMailanon.AddRelatedBodyPart("http://www.foo.bar/img/logo1.jpg", "http://www.foo.bar/img/logo1.jpg", CdoReferenceTypeName) objBPanon.Fields.Item("urn:schemas:mailheader:Content-ID") = "<http://www.foo.bar/img/logo1.jpg>" objBPanon.Fields.Update ConfURLanon = "http://schemas.microsoft.com/cdo/configuration/" with myConfanon .Fields.Item(ConfURLanon & "sendusing") = 2 .Fields.Item(ConfURLanon & "smtpserver") = "smtp.foo