asp-classic

ASP Classic SQL Multiple parameters [duplicate]

梦想与她 提交于 2019-12-11 19:36:08
问题 This question already has answers here : ASP Classic SQL Query error message, right syntax please (2 answers) Closed 6 years ago . What is the ASP Classic SQL query equivalent for this Oracle SQL: SELECT column1 FROM table WHERE column2 = '&num' AND column2 LIKE '&nam%'; 回答1: read about classic asp, adodb and so on, really! here's a untested example: sql = "SELECT column1 FROM table WHERE column2 = ? AND column3 LIKE ? + '%'" set cmd = server.createobject("ADODB.Command") cmd.activeconnection

Removing http:// prefix from ASP loaded URL [closed]

允我心安 提交于 2019-12-11 19:35:41
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . My page here has advertisers' URLs listed in full, but I'm not sure how to remove the http:// prefix. Here's the Code: <% if instr("abc"&rsAdvert("WebAddress"),"http:")>0 then shttp="" else shttp="http://" %> <li class="weblink"> | <a onclick="pageTracker._trackPageview('/TOP_FULL_ADVERT_WEBSITE/<%=shttp%><%

Post to current page, keeping querystring values in tact

↘锁芯ラ 提交于 2019-12-11 19:11:58
问题 I have a page that I want to create a drop down list, and post back to the same page that I am on now. How can I do this? One catch is, I want all the querystring values to be the same also, except for 1 which is what the drop down list will be overriding. 回答1: You can use both querystring and form variables in the same page if you want. If you use <form method="post"> and leave the action empty, it will post the form back to the current page, so that's one problem solved. There is one caveat

ASP grab parameter from referral url

烈酒焚心 提交于 2019-12-11 18:04:16
问题 Hi I am using a code to get the referral URL as you can see below: sRef = encode(Request.ServerVariables("HTTP_REFERER")) This code is getting the following URL: http://www.rzammit.com/pages/linux-form.asp?adv=101&loc=349 From that url I want to grab the ADV and LOC (Request.querystring doesnt work) Any help please on how I can do this? All this is happening in a script. 回答1: I can't believe I have done this. ASP Classic IS my first web programming love so I had to :) <% URL="http://www

Error ASP 0177: 8007007e Server.CreateObject fails for COM DLL

别来无恙 提交于 2019-12-11 17:25:34
问题 We have been trying to install a COM DLL on a new server. The interface is Classic ASP. The Map Connector DLL seems to be the problem but that is as far as I am able to get. We are unable to get the pages served by IIS to give anything other than a 500 error. When tracing the ASP: 127. -ASP_SCRIPT_TRACE_COM_CALL_END FilePath C:\INETPUB\WWWROOT\MILER\GLOBAL.ASA LineNumber 6 CurrentStatement set g_pcmsrv=Server.CreateObject("PCMServer.PCMServer") SizeOfStatement 55 0 ms 128. -ASP_LOG_ERROR

Wrong query being generated when using parameterized query in Classic Asp

两盒软妹~` 提交于 2019-12-11 17:11:42
问题 I am making a database call through the following parametrized query. set recordset = Server.CReateObject("ADODB.Recordset") set cmd1 = Server.CreateObject("ADODB.Command") cmd1.CommandText = "SELECT * FROM tbl_catmaster where (catname =? or catname =?) ORDER BY catname" cmd1.ActiveConnection = Conn //connection object already created cmd1.Parameters(0) = "programmer" cmd1.Parameters(1) = "developer" set recordset = cmd1.Execute My problem is that when I see the query in the sql server

ASP Classic SQL Query with two parameters [duplicate]

大憨熊 提交于 2019-12-11 16:42:07
问题 This question already has answers here : ASP Classic SQL Query error message, right syntax please (2 answers) Closed 6 years ago . This is SQL Query in ASP Classic: mQry = "SELECT DISTINCT name FROM best WHERE invoice_num = " & request.querystring("invoice_num") & " AND name LIKE '%" & request.querystring("org_name") & "%'" I am not sure if this is correct or what. Based on this query, I need to display or output " name " based on the two input parameters which is the invoice_num and the org

Stuck at Jquery Ajax Db Encoding for ISO-8859-9 Charset

我只是一个虾纸丫 提交于 2019-12-11 16:24:56
问题 I am trying to pass data to db via my Jquery application. I have serious problems with encoding. Current page encoding is iso-8859-9. I've made my ajax page encoding to iso-8859-9 and passing .ajax data with contentType: "application/x-www-form-urlencoded;charset=ISO-8859-9" It stores İZİN value as İZİN with every single trying. Is it work if I create a PHP page and set encoding with headers? PS: I am processing data on an HTML page. Processor page is an ASP page and using MsSQL db I guess.

Classic ASP - Display List of Timezones using powershell

心不动则不痛 提交于 2019-12-11 16:13:03
问题 Is there anyway to display system timezone using powershell GET-Timezone -ListAvailble. My requirements is to display this in a dropdownlist in an ASP page. Using .net com is not an option for me now, and even SQL server sys.time_zone_info. 回答1: You could use Shell.Exec to call the powershell command and read from the standard output. The powershell part is from Lee_Dailey's answer <% Set objShell = server.CreateObject("WScript.Shell") Set objExec = objShell.Exec("cmd /c powershell [System

VBScipt: Call builtin functions shadowed by global variables

别说谁变了你拦得住时间么 提交于 2019-12-11 15:48:51
问题 VBScript on ASP Classic contains an "int" function. (It rounds numbers towards -∞.) Suppose that some excessively "clever" coder has created a global variable named "int". Is there any way to get at the original function? I've tried all manner of workarounds with scoping and dodgy execs, but no dice. I suspect that it is impossible, but I'm hoping that someone will know more about it than I do. EDIT: Thanks for the responses. Since y'all asked, the global variable, called "Int" (though