How do I build a collection in classic ASP?
I want to be able to do:For Each thing In things End For CLASSIC ASP - NOT .NET!...
I want to be able to do:For Each thing In things End For CLASSIC ASP - NOT .NET!...
Is:For i = LBound(arr) To UBound(arr) The best way? What is the point in asking for LBound? Surely that is always 0 isn't it?...
Yes, I'm stuck supporting a legacy ASP application. I currently have VS2008 installed but it complains incessantly about the ASP and VBScript I am dealing with. What would be a better IDE to use to make it less sucky? Thanks, Geoff ...
I need to create and ASP page (not .NET, yes I know its ancient), which should run remote shell scripts on a UNIX server and then capture the output into variables in VBScript within the page itself. I have never done ASP or VBScipt before. I have tried to google this stuff, but all I find are references to remote server side scripting,...
Hey everyone, Is there any known way of listing the WMI classes and their properties available for a particular system? Im interested in a vbscript approach, but please suggest anything really :) P.S. Great site. ...
I am trying to generate a report by querying 2 databases (Sybase) in classic ASP. I have created 2 connection strings: connA for databaseA connB for databaseB Both databases are present on the same server (don't know if this matters) Queries: q1 = SELECT column1 INTO #temp FROM databaseA..table1 WHERE xyz="A" q2 = SELECT ...
In a macro for Visual Studio 6, I wanted to run an external program, so I typed: shell("p4 open " + ActiveDocument.FullName) Which gave me a type mismatch runtime error. What I ended up having to type was this: Dim wshShell Set wshShell = CreateObject("WScript.Shell") strResult = wshShell.Run("p4 open " + ActiveDocument.FullName) W...
What is the difference in ASP/VBScript between Int() & CInt()? ...
I need to script the creation of app pools and websites on IIS 6.0. I have been able to create these using adsutil.vbs and iisweb.vbs, but don't know how to set the version of ASP.NET for the sites I have just created to 2.0.50727.0. Ideally I would like to adsutil.vbs to update the metabase. How do I do this? ...
I have a couple of questions regarding VBScript and ASP Classic: 1) What is the preferred way to access an MS SQL Server database in VBScript/ASP? 2) What are best practices in regards to separating model from view from controller? 3) Any other things I should know about either VBScript or ASP? If you haven't noticed, I'm new at V...
Is the ZIP compression that is built into Windows XP/Vista/2003/2008 able to be scripted at all? What executable would I have to call from a BAT/CMD file? or is it possible to do it with VBScript? I realize that this is possible using WinZip, 7-Zip and other external applications, but I'm looking for something that requires no external ...
I have a student position working on some websites for my school. Everything my school does is in VBScript/ASP Classic. I'm a bit confused about something. I can understand that my school as a LOT of code written in VBScript, and that migrating it would be a phenomenal task. But is it just me, or is it kinda stupid that they make us ...
I tried editing it in VB.net 2005 and it's giving me syntax highlighting, but not intellisense. ...
I'm using WScript to automate some tasks, by using WScript.Shell to call external programs. However, right now it does not wait for the external program to finish, and instead moves on. This causes issues because I have some tasks dependent on others finishing first. I am using code like: ZipCommand = "7za.exe a -r -y " & ZipDest & Bu...
I'm a bit confused here. Microsoft as far as I can tell claims that parametrization is the best way to protect your database from SQL injection attacks. But I find two conflicting sources of information here: This page says to use the ADO command object. But this page says that the command object isn't safe for scripting. I seem to ...
I have a large classic ASP app that I have to maintain, and I repeatedly find myself thwarted by the lack of short-circuit evaluation capability. E.g., VBScript won't let you get away with: if not isNull(Rs("myField")) and Rs("myField") <> 0 then ... ...because if Rs("myField") is null, you get an error in the second condition, compa...
Suppose I have a COM object which users can access via a call such as: Set s = CreateObject("Server") What I'd like to be able to do is allow the user to specify an event handler for the object, like so: Function ServerEvent MsgBox "Event handled" End Function s.OnDoSomething = ServerEvent Is this possible and, if so, how do ...
Is it possible to use both JScript and VBScript in the same HTA? Can I call VBScript functions from JScript and vice-versa? Are there any "gotchas," like the JScript running first and the VBScript running second (classic ASP pages have this issue). ...
I have multiple users running attachemate on a Windows 2003 server. I want to kill attachemate.exe started by user_1 without killing attachemate.exe started by user_2. I want to use VBScript. ...
DOING THE POST IS NOT THE PROBLEM! Formatting the message so that I get a response is the problem. Ideally I'd be able to construct a message and use WinHTTP to perform a post to a WCF service (hosted in IIS) and get a response, but so far I've been unable to construct something that works properly. Does anyone have an example of doin...