asp-classic

Suggestions/pointers for Post/Get to an .ASP (or .ASPX) page from a desktop app

与世无争的帅哥 提交于 2020-01-14 06:08:47
问题 I'm planning to have a desktop app interact with some .ASP or .ASPX pages on a server. I've only done a little bit with .asp pages and I'm thinking I'd just Post or Get a URL with some variables: MySite.com/Functions.asp?FunctionName=?Paramater1=somevalue?Parameter2=... I'm wondering if there is any better way to go about this? Am I missing something? Is there perhaps a better way to go about this? 回答1: Windows Communication Foundation or Web Services may be a better idea if you don't require

Bulk Insert from CSV file to MS SQL Database

爱⌒轻易说出口 提交于 2020-01-14 05:14:15
问题 I have this working script that I use to BULK INSERT A CSV FILE. The code is: ' OPEN DATABASE dim objConn,strQuery,objBULK,strConnection set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString = "Driver={SQL Server Native Client 11.0};Server=DemoSrvCld;Trusted_Connection=no;UID=dcdcdcdcd;PWD=blabla;database=demotestTST;" objConn.Open strConnection set objBULK = Server.CreateObject("ADODB.Recordset") set objBULK.ActiveConnection = objConn dim strAPPPATH strAPPPATH="C:

Using Paypal REST API with Classic ASP

半世苍凉 提交于 2020-01-13 20:39:09
问题 I am trying to make a simple call to Paypal API with the follow code: On error resume next Set objHTTP = CreateObject("Microsoft.XMLHTTP") objHTTP.open "POST", "https://api.sandbox.paypal.com/v1/oauth2/token", False objHTTP.setRequestHeader "Accept", "application/json" objHTTP.setRequestHeader "Accept-Language", "en_US" objHTTP.setRequestHeader "Authorization", "Basic " & Base64Encode("client-id:secret") objHTTP.send "grant_type=client_credentials" Response.Write err.description & " | " & err

json Serialization in asp

女生的网名这么多〃 提交于 2020-01-13 20:19:19
问题 I have currently a dataset in asp which contains my members details. I am trying to serlize it so that it is similar to json_encode() in php which produces [{"0":"1","id":"1","1":"Eric","name":"Eric","2":"1","sex":"1","3":"1992","birthyear":"1992"},{"0":"2","id":"2","1":"Tom","name":"Tom","2":"1","sex":"1","3":"1992","birthyear":"1992"}] Any help here? 回答1: The json.org website links to two libraries, for ASP : JSON for ASP. JSON ASP utility class. 来源: https://stackoverflow.com/questions

Classic ASP to ASP.Net one-off session data copy

Deadly 提交于 2020-01-13 16:28:46
问题 We have an extensive classic ASP site, and we're looking to upgrade to ASP .Net (most probably the latest version). Obviously upgrading all the pages at once would be a leviathan task, so we're only looking to write new pages (and page rewrites) in ASP .Net at first. There are two obstacles to doing so: I have no idea how to access classic ASP session data in ASP .Net. This would only have to be set up once, as it is never modified by any page other than the login page. I'd prefer to have to

trying to connect to remote mysql from .asp page

此生再无相见时 提交于 2020-01-11 12:16:47
问题 I am trying to connect to a remote MySQL database from Classic ASP page, when I write VBScript code in it the website is giving HTTP 500 Internal Server Error. I checked with the host they are saying its not an error from their end. Please help me. <% dim myConnection dim connectString username = "bla" password = "bla" database = "bla" host = "bla" Set myConnection = Server.CreateObject("ADODB.Connection") Set RSTitleList = Server.CreateObject("ADODB.Recordset") connectString = "DRIVER={MySQL

Getting XMLHTTP to work with HTTPS

允我心安 提交于 2020-01-11 12:08:28
问题 I'm trying to access a soap webservice via classic asp over https, but I get the following error. MSXML3.DLL error '800c000e' A security problem occurred. My code: Function GetASPNetResources() Dim returnString Dim myXML Dim objRequest Dim objXMLDoc Dim strXmlToSend Dim webserviceurl Dim webserviceSOAPActionNameSpace strXmlToSend = "<some valid xml>" webserviceurl = "https://webserviceurl" webserviceSOAPActionNameSpace = "appname" Set objRequest = Server.createobject("MSXML2.XMLHTTP.3.0")

ASP Classic - convert base64binary string to byte array

橙三吉。 提交于 2020-01-11 09:47:07
问题 I am trying to convert a base64binary string to a byte array in classic ASP. StrConv() doesn't exist in ASP. My objective is to take the base64binary string received from a web service call, and write the binary format to a file. thanks, -m 回答1: When faced with a similar situation some time ago, I used MSXML to convert the data to a byte array before saving it to a file. You will need version 3 or higher. To do this you would: Load the data with MSXML Set the node's dataType property to bin

Why the output parameter of my ADODB.Command does not retrieve a value when executing?

半城伤御伤魂 提交于 2020-01-11 06:53:08
问题 I have a code in Classic ASP and SQL Server, the idea is simple, to have an stored procedure so you can insert a file but before that, the sp will check if the file already exists, after that will return an output parameter so I can check it on my asp page. The problem is the returning value of the output parameter is nothing, I cann´t figure out where is the problem.. The SP is: ALTER PROCEDURE [dbo].[pi_usu_crear_cuenta] @msg_salida char(1) OUTPUT /* 0=Registro ya existe, 1=Insert

How to get the length of Japanese characters in Javascript?

强颜欢笑 提交于 2020-01-11 05:29:14
问题 I have an ASP Classic page with SHIFT_JIS charset. The meta tag under the page's head section is like this: <meta http-equiv="Content-Type" content="text/html; charset=shift_jis"> My page has a text box (txtName) that should only allow 200 characters. I have a Javascript function that validates the character length, which is called on the onclick() event of my Submit button. if(document.frmPage.txtName.value.length > 200) { alert("You have exceeded the maximum length of 200."); return false;