asp-classic

html node parsing with ASP classic

陌路散爱 提交于 2019-12-11 07:43:29
问题 I stucked a day's trying to find a answer: is there a possibility with classic ASP, using MSXML2.ServerXMLHTTP.6.0 - to parse html code and extract a content of a HTML node by gived ID? For example: remote html file: <html> ..... <div id="description"> some important notes here </div> ..... </html> asp code <% ... Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP.6.0") objHTTP.Open "GET", url_of_remote_html, False objHTTP.Send ... %> Now - i read a lot of docs, that there is a possibility to

How do you query a database field containing single quotes?

血红的双手。 提交于 2019-12-11 07:38:46
问题 I am working in Classic ASP. I know there is a record that matches my simple SQL select query. It has the ' character ' in it. The code is as follows: Fieldname = Replace(trim(Request.form("Fieldname")),"'","'", 1, 10) 'replace the "'" up to 10 times with the ' code to avoid SQL issues, LOL. SQL = "select id,fieldname from table where fieldname='"&Trim(Fieldname)&"'" set rs = server.createobject("adodb.recordset") rs.open SQL, Application("conn"), 1, 1 If not rs.eof then response.redirect

Javascript code in classic asp

ぃ、小莉子 提交于 2019-12-11 07:35:47
问题 Hello I have a JavaScript code and I want to use it in ASP file but my error code says: Active Server Pages error 'ASP 0138' Nested Script Block /reklamsag.html, line 3 A script block cannot be placed inside another script block. My code is: <script src="http://ad.reklamport.com/scripts/rp.js" type="text/javascript"></script> <script type="text/javascript"> document.write("<script src='http://ad.reklamport.com/rpgetad.ashx?tt=t_canvecan_anasayfa_300x250&ciid=&rnd="+Math.random()%99999999+"'><

Building connection pool for a custom database in classic ASP

左心房为你撑大大i 提交于 2019-12-11 07:25:28
问题 In my real application, I have a VB6 DLL which is called from classic ASP pages. The application calls a non-standard database. I want to have a connection pool class which will stay alive permenantly. I set the compilation flags to keep the DLL in memory but despite that, the pool is periodically destroyed. I’ve already tried changing the ASP session timeout and the number of threads per processor, neither work. A previous respondent has told me ODBC can handle pool behavior for me, but that

SQL Server Stored Procedure Get a value from a row just inserted

本小妞迷上赌 提交于 2019-12-11 07:24:10
问题 I'm new to writing stored procedures and I'm trying to create a one that will be used to determine if a paypal transaction id exists in the database and if not add a customer to the database using the procedure parameters then return either the new customer's ID or -1 to indicate the transaction was already processed before. Here is what I have for the stored procedure: CREATE PROCEDURE [dbo].[addCustomerIfNotExist] @txn_id varchar(max), @fName nvarchar(255), @lastName nvarchar(255), @e_mail

use SQL Query in asp to populate scripting dictionary

半腔热情 提交于 2019-12-11 07:21:33
问题 this is an answer I received from another question. I was just wondering how I use an SQL Query in asp to add users to the scripting dictionary using a database instead of writing them manually. Set bannedUsers = CreateObject("Scripting.Dictionary") bannedUsers.Add "johnsmith", True bannedUsers.Add "cmanson", True ... For Each opt In document.getElementById("frmNew").options If opt.selected And bannedUser.Exists(opt.text) Then MsgBox "This user is banned." End If Next 回答1: You need to

Multiple record insert - Classsic ASP

百般思念 提交于 2019-12-11 07:01:39
问题 I need to fetch data from one table (multiple rows) and insert into other table after modifying and adding some new fields. For example: Table 1 itemid, price, qnt, date_of_dispatch ,etc Table2 Invoiceid, Invoicedate, customer_id, itemid, price, qnt, total_amt, date_of_dispatch, grandtotal Please help me to make it in Classic asp with ms access in first stage I will fetch record in page from table one (multiple rows) so user can modify , then after click save button insert all data in present

How can I show my google analytics traffic report via asp.net or classic asp?

可紊 提交于 2019-12-11 06:59:15
问题 How can I show my google analytics traffic report (AKA 'View Report') via asp.net or classic asp? 回答1: There are several APIs for querying data from Analytics. For example in both JavaScript and C#. See the developer guide for more information. I don't think there is an easy way to just include their report into an existing page. You would have to use the APIs. 回答2: you can use the google data APIs to pull feed data as xml look at this tool it lets you run text queries and see the results

Type mismatch on an Array assignment in ASP

六月ゝ 毕业季﹏ 提交于 2019-12-11 06:57:57
问题 Its been a while since I've worked with ASP, but I'm getting a Type mismatch error on what seems to be a simple assignment statement. Can anyone shed some light on why this might be happening. This works, but when I try to foreach an unassigned Questions block I get an Object not a collection error Class Survey public ID public Title public Questions End Class Sub Test() Dim oSurvey Set oSurvey = new Survey Dim aQuestions(2) Set aQuestions(0) = new Question ' Other aQuestions assignments

how to load xml file in classic asp [duplicate]

一曲冷凌霜 提交于 2019-12-11 06:48:26
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: How to parse xml with Classic asp? I want to load one XML file in classic ASP. I am using blnFileExists = objDom.Load(Server.MapPath("\a\abcfiles\admin\image_name.xml")) but when I write blnFileExists it gives me false. What should I do? 回答1: Write the contents of objDOM.parseError.reason to the response to find out why it didn't load. 回答2: Verify the file path is as you have it written. The way you have it