asp-classic

Asp XML Parsing

╄→尐↘猪︶ㄣ 提交于 2020-01-09 10:53:14
问题 I am new to asp and have a deadline in the next few days. i receive the following xml from within a webservice response. print("<?xml version="1.0" encoding="UTF-8"?> <user_data> <execution_status>0</execution_status> <row_count>1</row_count> <txn_id>stuetd678</txn_id> <person_info> <attribute name="firstname">john</attribute> <attribute name="lastname">doe</attribute> <attribute name="emailaddress">john.doe@johnmail.com</attribute> </person_info> </user_data>"); How can i parse this xml into

how to combine Two recordset data to one recordset in classic asp

旧时模样 提交于 2020-01-07 08:54:09
问题 I am calling two “stored procedures” using different database connection. I used two separate record sets in page but I required combining both in one record set along with sorting also required. Ex: two records set Rs1, Rs2 Rs1 data Emp_code Name Grade 001 Bcd A 004 Abc C Rs2 data Emp_code Name Grade 002 Xyz A 005 Zxy B But I required to displaying following table with sorting (emp_code asc, name asc, grade asc) Emp_code Name Grade 001 Bcd A 002 Xyz A 004 Abc C 005 Zxy B click this link it

Using variables from previous ASP page

拟墨画扇 提交于 2020-01-07 06:28:11
问题 On my first page I have an array defined as: dim selection selection = Array("name", "city") On the following ASP page I'd like to call the same variables but I'm having a hard time figuring out how. This has been my basic structure as I attempt different solutions but this does not work, my results are always blank because I don't think I'm calling the variables correctly: dim userselect userselect = request.form("selection(0)") dim cityselect cityselect = request.form("selection(1)") If I

Why am I getting unexpected error in ado with classic asp?

自古美人都是妖i 提交于 2020-01-07 05:34:27
问题 I have this (I have a connection above all this not shown): Set cmd = Server.CreateObject("ADODB.Command") Set cmd.ActiveConnection = conn cmd.CommandType = 1 cmd.Parameters.Append .CreateParameter("LASTNAME", 200, 1, 50, "JONES") cmd.CommandText = "select * from employees where lastname = ?" cmd.Prepared = True Set rs = cmd.Execute As soon as I execute I get: Active Server Pages error 'ASP 0115' Unexpected error myasppage.asp A trappable error (C0000005) occurred in an external object. The

jQuery Drag and Drop Upload

China☆狼群 提交于 2020-01-07 05:21:27
问题 I need to built a page that user can drag and drop file and upload it on ftp server. Its just an upload and nothing else. Does anyone have any idea? 回答1: drag n drop is a clientside issue, ASP runs on the server. jquery is the correct approach for clientside coding problems. jQuery is crossbrowser compatible just google jQuery drag n drop upload for examples 来源: https://stackoverflow.com/questions/4931257/jquery-drag-and-drop-upload

classic asp verify the server result

假如想象 提交于 2020-01-07 04:01:06
问题 I am trying to check or unchecked the check-boxes depends upon the data results that comes from server. But I cannot use below code correctly where I am doing wrong? <% Dim AFTER_SAVE, IN_VIEW, Y Dim SQL, Data SQL = " SELECT code, name, value FROM mytable WHERE code = '" & User & "'" Data = Data(SQL) %> <%If IsArray(Data) Then%> <%If ((Data(1,0) = "AFTER_SAVE") AND (Data(2,0) = "Y")) Then %> document.getElementById("chkSave").checked == true; <%End If%> <% If ((Data(1,0) = "IN_VIEW") AND

Store old data in one column and update new data in another column within same table

白昼怎懂夜的黑 提交于 2020-01-07 02:51:06
问题 I'm not a professional programmer but an enthusiast who needs help. Here is my challenge: I have a table full of data for our employees. Currently, any of our employees can go to the "Update" web page on our web site and type in his new last name over the previous one that is displayed in a textbox and click submit, his last name will be updated in the database. However, my supervisor wants to keep the employees' previous last name in the same table as the new last name. Her idea is when an

ADODB Connection String not working in Classic ASP

两盒软妹~` 提交于 2020-01-06 20:37:18
问题 I have been developing an ASP.NET application. I want to integrate Classic ASP file(.asp) in this application. In a .asp file I have to fetch data from SQL Server 2008 r2 database. For this I have created db and rs object. I have passed ConnectionString in db.Open function. But I am getting no output for this code. Following is my code set db = Server.CreateObject("ADODB.Connection") db.Open "provider=SQLNCLI10;Data Source=HP-PC\SQLEXPRESS;Initial Catalog=RMToday;Persist Security Info=True;"

HTTP Post request with tab delimited field

会有一股神秘感。 提交于 2020-01-06 19:53:40
问题 I've been asked to set up a web service for account creation. The inbound HTTP Post request contains a single formatted field containing tab delimited fields with a header line wrapped in tags. Here's a sample: accountRequest=<NewUser> userName password fName lName ABC123 wzbtw88g Joe Bloggs </NewUser> Can anyone help me understand how to parse it with Classic ASP? 回答1: extract the values into a string and do something like this <% str="userName password fName lName ABC123 wzbtw88g Joe Bloggs

Server.createObject with Persist.Mailsender error

我与影子孤独终老i 提交于 2020-01-06 19:38:29
问题 I am having a problem with this line Set Mail = Server.CreateObject("Persits.MailSender") in my code. This code used to work fine before. All of a sudden it started throwing an error stating the create object failed. Can anyone suggest a work around? Set Mail = Server.CreateObject("Persits.MailSender")" ' enter valid SMTP host Mail.Host = "smtpeu1-css.shell.com" Mail.From = "SHIPLocalHost@shell.com" Mail.FromName = "SHIPLocalHost@shell.com" Mail.AddAddress defaultTestEmail,