Error trying to call stored procedure with prepared statement

You want something like this (untested) Dim cmd, rs, ars, conn Set cmd = Server.CreateObject(“ADODB.Command”) With cmd ‘Assuming passing connection string if passing ADODB.Connection object ‘make sure you use Set .ActiveConnection = conn also conn.Open should ‘have been already called. .ActiveConnection = conn ‘adCmdStoredProc is Constant value for 4 (include adovbs or ‘set typelib in … Read more

Adding a GUI to VBScript

VBScript has dialogs, only not many and no checkboxes, you would need a COM object to do so (and there are). I’m sure you know Messagebox and here an example of the less known Popup Dim WshShell, BtnCode Set WshShell = WScript.CreateObject(“WScript.Shell”) BtnCode = WshShell.Popup(“Do you feel alright?”, 7, “Answer This Question:”, 4 + 32) … Read more

Rowset does not support scrolling backward

adOpenDynamic is not declared in VBScript and therefore equals Empty, which gets converted to 0 when you assign the CursorType property. 0 is adOpenForwardOnly, and forward only does not support moving backwards, an ability the Find method wants. You should replace adOpenDynamic with its literal value: Recordset.CursorType = 2 ‘adOpenDynamic To avoid this class of … Read more

Visual Basic scripting dynamic array

You can’t re-dimension a fixed-size array (Dim vprglist(10)). If you want a dynamic array, define a “normal” variable and assign an empty array to it: Dim vprglist : vprglist = Array() or define it directly with ReDim: ReDim vprglist(-1) Then you can re-dimension the array like this: If vprogram.LastRunTime = “” Then ReDim Preserve vprglist(UBound(vprglist)+1) … Read more