Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Search the Tips
Tip Bank > Visual Basic > VBScript

VBScript - Page 4

61-80 of 96     Previous     Next
Passing Collections Between ASP Pages
by DevX Pro
I am generating Active Server Pages using Visual InterDev and VBScript. I have fetched all my records from the database through my ActiveX DLL into a collection variable. Can I pass my whole collection to some other ASP so that it will minimize the trip to the server? A request.querystring doesn't work. I tried page objects and many things, but still got stuck at one point.
Using ASP and VBScript
by DevX Pro
I am developing an application using VBScript and ASP. I wrote this HTML code to be executed on a client's machine: The user will enter the name of customer in the first text box. When the user clicks the Submit button, I want to display the age of the customer in another text box on the same HTML form. The code required to search for the customer and obtaining the age is written in the "server.asp" file located on my server (I am using Personal Web Server). The code works, but I do not know how to get the data (age of the customer) from the server back to the current HTML form running on the client machine. If there is no way to do this with ASP and VBScript, can you suggest something else?
Is There a GoTo Statement in ASP?
by DevX Pro
Is GoTo a valid Statement in ASP? I need to do something like this: If x=y then Goto THERE end if THERE: bla bla bla
Converting a System Date to a Text String
by DevX Pro
I want to retrieve the system date and convert it to a text string. I can get the system date (using the Date() function call), but I cannot write the date to a text file (using the WriteLine method from a TextStream object) unless it is in a string format. The VB Format$() function does not work in the scripting version of VB. Do you have any suggestions?
Displaying Excel Information in ASP Pages
by DevX Pro
How can ASP query an Excel sheet and get all the books' names that reside in that Excel document using ADO (or any other way)? I want to display all contents of the Excel sheet on a Web page using ASP.
Passing Arguments By Reference/Pointer in ASP
by DevX Pro
I am using a COM object written in Visual C++ using MFC. One of the object methods has a signature like this: void Function(BSTR, BSTR, long*) Whenever I call this method I get a type mismatch on the last parameter. How can I pass a long* from an ASP script either using VBScript or JavaScript? (I am running Microsoft Personal Web Server.)
Handling Session Timeouts
by DevX Pro
When a user accesses an application on my site, a sessionID is generated. After the application is accessed the user leaves the machine alone until the session times out. I know the session expired, since I have session_onend logging the occurrence to a database. If the user left his browser open and wants to view my application again, the old sessionID is used. If he closes the browser and opens it again, a new sessionID is created. How can I force a new session to be created the browser is left open?
Passing Arguments to ASP pages
by DevX Pro
I know that when using products like Cold Fusion, you can pass parameters to the page that does the work. Example: [*.cfm]. I have been trying to do this directly with ASP pages, but have not been successful. Can this be done?
Beware of Single Quotes When Working With SQL
by Ken Cox
When concatenating a SQL statement such as INSERT, you may have trouble if your field value contains an apostrophe (') such as in "Commedia Dell'Arte." SQL thinks the apostrophe is a delimiter for ...
"Disable" the Browser's Back Button
by Kurt Cagle
While there is no way to specifically disable the back button from within the browser, you can shortcut the navigation to another page. The trick is to catch the onbeforeunload event of the ...
ADO connection to an mdb database fails
by DevX Pro
Summary of the problem: Connecting directly to a Microsoft Access database from a Web project developed in Interdev 6.0 fails unless I modify every .Open to use a connection string constructed on the spot [as opposed to .Open Application('Blah_ConnectionString') ... ] For example: Using the Gallery sample provided and built by InterDev 6.0 produces a connection string in Global.asa as follows: Application("Gallery_ConnectionString") = "DBQ=\\myserver\www$\Gallery.mdb;DefaultDir=\\myserver \www$\;Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;ImplicitCommitSync=Yes;MaxBufferSize=512;MaxScanRows=8;PageTimeout=5; Threads=3;UID=admin;UserCommitSync=Yes;;User Id=admin;" Yet all attempts to use the connection from ADO components such as within ADO Recordset produce the following error: ------------------------------------------------------------- -------------------------------- ADODB.Connection error '800a0bb9' The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. /Gallery/DEntry/Entry.asp, line 188 --------------------------------------------------------- ------------------------------------ Line 188 in Entry.asp actually points to the line before the .Open. However, the nature of the error message and past fixes where I corrected the error by modifying the .Open implies that the statement containing .Open is the problem. Here are lines 188 and 189: 188> DBConn.CursorLocation = Application('Gallery_CursorLocation'); 189> DBConn.Open(Application('Gallery_ConnectionString'), Application('Gallery_RuntimeUserName'), Application('Gallery_RuntimePassword')); The implications of this problem are that the scope of the Application object established within Global.asa is not in fact global to the project. Which implies that the Web server has been incorrectly configured? This is my current working hypothesis.
Returning data in a neatly formatted HTML page
by DevX Pro
I am using a combination of HTML and ASP pages to pull data from a database. I use one HTML page to request the info with a form, which is then passed to an APS page that gathers the recordset. I want to then pass (access) the recordset to a generic results HTML page that I can use regardless of the search type. I can't figure out how to get the recordset at the final HTML page.
Use a Selfmade ActiveX-DLL on an ASP
by DevX Pro
I've made an ActiveX-DLL using VB6 with one public and several private functions. How can I use (and call) the public function from an Active Server Page??
Add and Subtract Dates Using VBScript
by William Wen
VBScript has two functions for adding/subtracting dates or date values: DateAdd and DateDiff. For ...
Validate Numbers With IsNumeric() and Vartype() in VBScript
by Ken Cox
When accepting input from an HTML form, you can't assume that the user will provide the right type of data--you have to validate. For instance, if you ask users to type a digit but they type a ...
Make ASP-Generated Code Easier to Read With VbCrLf
by Ken Cox
Technically, neatness doesn't count in the world of HTML source code. However, nicely formatted source code makes debugging easier and adds a professional touch to your work. That's why HTML text ...
Use Brackets to Keep VID 6 Happy
by Ken Cox
When you use the Scripting Object Model (SOM) in Visual InterDev 6, keep in mind that the script library is biased towards JavaScript. Your perfectly valid VBScript may produce strange errors when ...
List Files With FileSystemObjects
by William Wen
One of Visual Basic's handiest functions is the Dir function, which allows you to find all the files with a given filespec. VBScript does not have an identical function, but it does provide a way to ...
Automate E-mail with VBScript
by William Wen
If you have Simple Mail Transfer Protocol (SMTP) installed with Internet Information Server (IIS), you can automate e-mail through VBScript. The Collaboration Data Objects for Windows NT Server ...
Helpful VBScript Date Functions
by William Wen
VBScript has some neat date functions. For example, if you want to display a database date field such as "3/14/99" as "Sunday, March 14, 1999", try this ...
61-80 of 96     Previous     Next
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date