asp-classic

Connecting to SQL Server 2008 database using asp

十年热恋 提交于 2019-12-08 12:23:24
问题 I tried a lot but I am not able to deal with this problem. I wasted last 2 days without any significant result. Hope I will get some help here. I wanted to connect to a SQL Server 2008 database using ASP. I installed SQL Server 2008, created a database, but I am not able to connect to that database using the asp code. I can see the database in Visual Web Developer, I can also connect it through asp.net using the add connection wizard of visual web developer but I don't want to use add

How to return month and year only except days from date?

 ̄綄美尐妖づ 提交于 2019-12-08 11:27:26
i have a particular case of a task that was assigned to me like a week ago and i'm stuck on it. last week i was told that i have to make that i need to make a search that finds all rows inserted in a determined month of a particular year, let's say i need to return all rows inserted in november of 2019 not specifying the day, that is fine to that point, the tricky part is that usually the database i work on have the dates converted to number, resulting in dates stored something like this "43275" because of the numeric conversión so it makes difficult to search data because it won't match

How to connect to local database using ASP classic :(

主宰稳场 提交于 2019-12-08 11:17:26
问题 I have connected to my local database through SQLSMS using the string (LocalDb)\v11.0 It opened up a connection and I could add a database. In my ASP classic code (don't ask :( C#.NET FTW!.. damn clients) I have the following code: objConn.ConnectionString = "Provider=SQLOLEDB;Persist Security Info=True;Data Source=(LocalDb)\v11.0;Initial Catalog=databasename" It is returning this error: Invalid authorization specification I have no idea what to put in for the User Id and Password parameters?

How do I add whitespace/formatting to XML created in vbscript?

烈酒焚心 提交于 2019-12-08 10:38:19
问题 I'm using vbscript to write form data to an XML file: Set objRecord = objDom.createElement("story") objRoot.appendChild objRecord Set objField = objDom.createElement("first") objField.Text = Request.Form("fName") objRecord.appendChild objField which works, but the output has no formatting like you would expect from an XML file: <story><first>Jennifer</first></story><story><first>David</first></story><story><first>Austin</first></story><story><first>Steve</first></story> I'm trying to achieve:

Can I set CharSet for every page load? (Classic ASP)

空扰寡人 提交于 2019-12-08 10:17:16
问题 I have made some changes to a Classic ASP application which breaks foreign letters unless "Response.Charset = "utf-8"" is set in every page... And it's a lot of pages... Could I force the Charset to utf-8 for every page without having to set it in each page? 回答1: You can make sure that asp files are served with this header. In IIS 5.1/6, go to the website properties, click "File Types" and make sure the Content Type for asp files is text/html;charset=UTF-8 . IIS 7 has a similar setting. Go to

Creating the shortest possible case-insensitive verification number

↘锁芯ラ 提交于 2019-12-08 10:08:58
问题 This is going to be a little long and rambly, but I want to make sure everything is in the proper context. Back in 2004 I wrote an online Learning Management System using Classic ASP and VBScript. I'm now working on some upgrades (and periodically asking myself WTF I was thinking when I wrote various segments of code...), and I want to take this opportunity to resolve one of the frequent complaints I get - the size of the verification numbers. When you complete a test online, a verification

Invalid Instance when using ADODB.Recordset

偶尔善良 提交于 2019-12-08 09:50:36
问题 I have migrated from one sever to another. I have restored my database and reset up my website. Since migrating however my website will not connect to the database I am getting the following error: Microsoft OLE DB Provider for SQL Server error '80004005' [DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection. My connection string is in the form of CON_STRING = "Provider=SQLOLEDB;Data Source=myserver;Initial Catalog=mydb;User Id=user;Password=password" The error is being thrown on

Get distinct attributes for XML nodes

末鹿安然 提交于 2019-12-08 09:45:30
问题 I`ve been trying to get distinct attribute values from the XML: dim i,xmlOx,arr(100) "xmlOx" has following xml structure <root> <a x="Animal" y="Bird"/> <a x="Animal" y="Bird"/> <a x="Country" y="Bird"/> <a x="Animal" y="Bird"/> </root> asp: for i=0 xmlOx.selectNodes("a").length-1 arr(i)=xmlOx(i).selectNodes("a").getAttribute("x") next Like,here i ve to get "x" attribute values but I don t need duplicates.Then I need to add the values to an array in vbscript. Please someone tell me how we do

Upgraded app to MVC 4, AUTH_USER is blank

早过忘川 提交于 2019-12-08 09:00:01
问题 I have a hybrid classic ASP + ASP.NET MVC 4 application running under Win Server 2k3 (IIS6) which we have upgraded to use MVC 4. The ASP app is attached to the .NET application via a virtual directory. They run in the same application pool (if that matters). This particular app is an admin control panel, and uses basic authentication: Before upgrading the project, when access the url for the virtual folder, the browser would display a login prompt, where I enter my domain-qualified username

Can I create Date entry control with date separator for classic ASP

∥☆過路亽.° 提交于 2019-12-08 08:54:21
问题 I was using a calendar control for entry of date in a classic-ASP application. But calendar control is not keyboard friendly and take more time for data entry. So later I added a simple text box with date validation. It works fine. However, the user need to put the date separator also. I wish to put a date entry field that comes with a pre-configured date format and separator, so that the user simply type on the numbers and the field cause a validation as well. How can I achieve this? 回答1: