asp-classic

mimetype file with asp

醉酒当歌 提交于 2019-12-25 04:43:04
问题 Is there a way to get the mimetype of a file by using asp? If just have the path to the file. 回答1: One possible way of doing this would be to take the file extension of the file and look up the Registry key HKEY_CLASSES_ROOT\<file extension> . There should be a "Content Type" value under this key that gives the MIME type of the file, at least for the most popular file types. This assumes the file extension is a reliable indicator of the file's contents. On Unix, there is the file command

How would one go about gathering information from one column in an SQL database(specific cell) that has double or triple values

馋奶兔 提交于 2019-12-25 04:41:45
问题 How would one go about gathering information from one column in an SQL database(specific cell) that has double or triple values stored in it, like: row_number column1 1 A,B 2 B,D *Note: the above table is not true, just an example and place it in a column with the "AS" attribute according to a rank over to another column after you have split column1? The situation I have is as follows: I am able to split and do the above with case statements, but I am only able to get value "B" after I split

Classic ASP For Each Loop terminating too early

雨燕双飞 提交于 2019-12-25 04:12:27
问题 I have a very odd problem with one of my ASP scripts. It is a simple script, reads information from a database into a recordset and loops through the recordset, each time outputting HTML as a table row. I'm having an issue where periodically it gets close to the end of its for each loop and it just stops without getting through all the recordsets. I know it is stopping because my resulting HTML only goes as far down as S or T in the recordset. The script is not crashing because underneath the

Classic ASP MySQL Wrong Authentication Method

偶尔善良 提交于 2019-12-25 04:07:00
问题 I have a classic ASP site that I just uploaded to a different server, and it is giving the following error: Microsoft OLE DB Provider for ODBC Drivers error '80004005' [MySQL][ODBC 3.51 Driver]Client does not support authentication protocol requested by server; consider upgrading MySQL client I tried doing what is suggested everywhere including the official MySQL website: http://dev.mysql.com/doc/refman/5.6/en/old-client.html That is, going to the mysql.user table and changing the password

dynamically executing classic ASP pages

半世苍凉 提交于 2019-12-25 03:44:31
问题 I'd like to store the contents of classic ASP pages in a table in a database, and have the ability to dynamically retrieve said contents and execute on the fly. Is this possible? 回答1: You can get the text from the database, save it to a temporal .asp file in the website, and then execute a Server.Execute(tempfile). Don't forget to delete the tempfile... 回答2: You are probably looking for the "Execute" statement. Dim aspCode aspCode = getCodeFromDB() ' I assume you can handle this part Execute

Condition in Case of Select/Case statement in classic ASP

巧了我就是萌 提交于 2019-12-25 03:35:21
问题 I've recently been tasked with updating a classic ASP page and have no experience in this language. Is it possible to write a condition into a Select statement's case like so: Select Case <variable> Case <value> && <if variable2 == something> Case <value> || <if variable2 == something else> 回答1: This uses comma syntax: Case <value>, variable2 = something else <--- case satisfies either condition. You cannot build IF statements into the cases. BTW: VBScript uses "and", "or" and "=", instead of

ajax sub page to communicate back to the parent page

假装没事ソ 提交于 2019-12-25 03:16:01
问题 i have a parent page that calls a sub page in a div. the parent page has a text box <input name="txtTicketNo" placeholder="Ticket #" type="text" value="" class="textbox" readonly="readonly" id="txtTicketNo"> when the child page is called it queries the DB and gets the new record ID which lets says is 1271. so in the child page my code piece looks like this. <input type="hidden" name="sub_tIDi" id="sub_tIDi" value="<%=oRs(0)%>"> Now i want this 1271 to be written into txtTicketNo in the parent

Classic ASP error '800a01ad' ActiveX component can't create object

a 夏天 提交于 2019-12-25 02:59:41
问题 we have a system that wasnt designed by us, and part of that system is a classic ASP portal. The portal is currently running with no issues on one of out servers. We want to do some development work on the portal, so we want to put it on TFS, and than work on it locally. The problem no matter what I tried we cant make it run locally. this is what we tried: import the IIS setting from the working server register whatever dll we can think of Pool is running with system network credentials pool

ADODB SQL Server connection not working only in IE9

本秂侑毒 提交于 2019-12-25 02:59:26
问题 Got a bit of an odd problem. This code works fine in every other browser, just not in IE9. Standard ADODB connection string being used: Provider=sqloledb;Server=localhost\sqlexpress;Database=DB;uid=DBuser;password=DBPassword;MultipleActiveRecordSets=true; Executed thus: Dim dbGlobal Set dbGlobal = Server.CreateObject("ADODB.Connection") dbGlobal.Open sConnectionString In every browser this works and the application then goes on to load, in IE9 I get the following error message back:

SOAP Request in Classic ASP

百般思念 提交于 2019-12-25 02:47:12
问题 I have the following simple Soap request code. (using classic ASP) I've read many tutorials on consuming SOAP feeds in classic ASP, but none of them seem to work at all. I try the following code: soapEnvelope = _ "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/""" &_ "xmlns:etp=""https://test.mpay24.com/soap/etp/1.5/ETP.wsdl"">" &_ "<soapenv:Header/>" &_ " <soapenv:Body>" &_ " <etp:SelectPayment>" &_ " <merchantID>XXXXXX</merchantID>" &_ " <mdxi>" &_ " <Order>" &_