asp-classic

Add Record to Database and Upload an Image at the same time (2nd Attempt with different code)

蹲街弑〆低调 提交于 2019-12-24 22:00:02
问题 Having problems! I have messed with this code over and over. This is just one of my attempts. Trying to add a record to a database and upload an image at the same time. The first one I sent would add the record but, would not upload the image. This one will upload the image but, will not add the record. My patience is running out. On this one I'm getting a error saying I can't use generic requests. <%@ Language=VBScript %> <% option explicit Response.Expires = -1 Server.ScriptTimeout = 600

How can I debug both classic ASP and ASP.NET code in the same debugger session?

别说谁变了你拦得住时间么 提交于 2019-12-24 21:34:43
问题 I have a web app which is a mix of classic ASP and ASP.NET code, and I'd like to use the debugger. However it seems from looking at the Modules window in Visual Studio that only the ASP code happens to be available to the debugger at the moment; I get "the breakpoint will not be hit, no symbols have been loaded for this document" when I set a breakpoint in the ASP.NET code. How do I make both the ASP and ASP.NET code available? Or failing that, how do I switch between the two? Earlier I was

Read and write arrays to from file

限于喜欢 提交于 2019-12-24 17:43:29
问题 I have a class which create session file on disk with written inside colon-separated fields. <% Class MySession Private session_key, stream Private Sub Class_Initialize set stream = createobject("adodb.stream") session_key = request.cookies("sessionkey") if len(session_key) = 0 then CreateSession() end if End Sub ' read from session file Public Property Get val() on error resume next val = "" stream.open stream.loadfromfile "d:\" & session_key val = stream.readtext stream.close End Property '

Form post asp classic xmlhttp

北城余情 提交于 2019-12-24 17:21:04
问题 I'm trying to do a form post from another site that is not mine, but I am not able ta give error. There on the site the post is mounted like this: <a href="javascript:document.result.submit()" class="lnk-more">Veja o resultado da enquete anterior »</a> <br /><br /> <form name="result" action="http://enquete.terra.com.br/enquete.cgi" method="post"> <input type="hidden" name="id_enquete" value="144143"> <input type="hidden" name="opcao" value="0"> </form> And I'm riding in the asp script to

Sorting an Array of times in Classic ASP

我怕爱的太早我们不能终老 提交于 2019-12-24 17:12:34
问题 had to return to a old app I had build in Classic ASP and do a few changes, however one bit is stumping me. I have a string such as: theTimings = "12:00-14:30,18:00-22:30,07:30-10:30" I am turning this into an Array using timingsArray=Split(theTimings,",") However I need to sort this Array so the earliest times appear first, i.e. 07:30-10:30,12:00-14:30,18:00-22:30 Anyone got any idea how to do this? 回答1: You want to sort an array, Classic VBScript ASP does not offer that. So you got 4

Cannot open database “dbname” requested by the login. The login failed

这一生的挚爱 提交于 2019-12-24 15:24:08
问题 I'm trying to make a connection to sql server database(hosted on localhost) but keep getting the error mentioned in the title. Application("ConnectionString") = "Provider=SQLOLEDB;Data Source=localhost\SQLExpress;Database=mydb;Trusted_Connection=yes;UID=dbadmin; PWD=dbadmin" Application("ConnectionTimeout") = 15 Application("CommandTimeout") = 90 Application("CursorLocation") = 3 strQuery = "select * from dec_users" Set objDBConnection = Server.CreateObject("ADODB.Connection") objDBConnection

Reliability of Path_INFO server variable in classic ASP

半城伤御伤魂 提交于 2019-12-24 14:58:51
问题 Am I always going to be able to use PATH_INFO to derive the root of my application as in the following function? function CommonFunctions_getRoot() pathinfo=Request.ServerVariables("PATH_INFO") Set myRegExp = New RegExp myRegExp.IgnoreCase = True myRegExp.Global = True myRegExp.Pattern = "^(/\w*/).*" CommonFunctions_getRoot = myRegExp.Replace (pathinfo, "$1") end function 回答1: PATH_INFO is reliable. The only problem I can think of is that you may have issues if you use URL rewriting. 来源:

Exact same file and code. So why does the binary of my docx file always end differently?

∥☆過路亽.° 提交于 2019-12-24 14:21:52
问题 We take a (non-corrupted) .docx file from our server and post it via httprequest to an API. When downloading it from the API it comes out corrupted. I 99% sure that this is down to the code that posts the file, not the API. It turns out the corrupted file had some extra characters in the binary - I thought it would be pretty easy to find out where they came from and remove them. Boy was I wrong. I've since realised that every time we post the file, the binary ending is slightly different. We

Contact form 7 post to .asp

喜欢而已 提交于 2019-12-24 14:08:05
问题 Is it possible to post the form contents of Contact Form 7 form fields to an awaiting .asp page? My form has four input fields and one hidden field. Name, Telephone, Email, HowFoundUs, Refer. I want to post those input values to the following .asp page: clientsite.com/default.asp?name=xxxxxx&telephone=xxxxxxxx&howfoundus=xxxxxx&email=xxxxx&refer=xxxxxxx I have been searching through the plugin files and have yet to find anything. 回答1: Yes, you have to change the "action" attribute in the form

ASP Classic Fire and Forget

非 Y 不嫁゛ 提交于 2019-12-24 13:33:13
问题 I have a "Remote Control" webpage that lets me "manage" key stats for a website e.g there is a page that shows the stats, no of records, dates, times things happened, whether they have happened or not and so on. Then I have "a remote control" page which lets me fire off certain tasks such as "run job A" "set value of X to C" "delete records in table B" and so on. This is just a list of links that then runs an SQL ADO Command with an ADO Connection string. At the moment the page waits for the