Browse DevX
Sign up for e-mail newsletters from DevX

Search the Tips
Tip Bank > Database Development > Active Server Pages

Active Server Pages - Page 5

81-100 of 432     Previous     Next
ASP components aren't released by setting their references to Nothing
by Francesco Balena
If you instantiate an ActiveX component from an ASP script under IIS 4 and previous versions, using the Server.CreateObject command, you might believe that the object is deallocated as soon as you set its reference to Nothing - this is how all COM components work, right? The problem with ...
Use Server.HTMLEncode for strings stored in a database
by Francesco Balena
If your ASP pages display strings stored in database fields, you should always process the strings with the Server.HTMLEncode method, otherwise the string won't be displayed correctly in the user's browser if it contains characters that have a special meaning to HTML, such as the quote ...
ASP Compatibility
by DevX Pro
According to the stats of my Web site, there are still quite a few users who use old browsers like Netscape 3.0 and Explorer 3.0. If I start using XML on my Web site, will my site be compatible with these older browsers?
Searching a Database for a Keyword
by DevX Pro
When setting up a recordset, is it possible to get a record when the field contains more than the word that I'm looking for and where the words are in no particular order? For example: StrName = 'Direct' RSShops = Server.CreateObject("ADODB.Recordset") strSql = "SELECT * FROM Shops WHERE Name = '" & StrName & "' Can I get the recordset to contain any shop/company with 'direct' in it's name?
Sending Null Values to a Required Field
by DevX Pro
When I try to send some information to an access database through ASP, I get the following error: [Microsoft][ODBC Microsoft Access 97 Driver] Field 'tablename.class' can't be a zero-length string. This is the code from my page: Set conn = Server.CreateObject("ADODB.Connection") data_source = "DBQ=" & Server.MapPath("filename.mdb") conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & data_source Define strSQL conn.Execute strSQL conn.Close Set conn = Nothing Can you tell me what I'm doing wrong?
Turn Off Explicit ASP Error Messages in IIS
by Roger Oney
Of course no one ever sees an error on your Web site—but just in case, you can turn off explicit ASP error messages on your live site for better security and a more user friendly experience. ...
Client-side Processing With ASP
by DevX Pro
We've developed a TV scheduling program in HTML, but we have problems with speed (connectivity as well as display refresh) and the inherent functional limitations of HTML. We need to add in more modifications that would add to the top-heaviness of the application. Specifically, can we use client-side processing with ASP?
Populating ListBox from Recordset Values
by DevX Pro
I am trying to populate a drop-down listbox with the data from a table within my database and a blank line. The code I am using is as follows: Fees Test " &_ "" rsGamelvl.MoveNext Loop 'close my connection rsGamelvl.Close dcGamelvl.Close Set rsGamelvl = Nothing Set dcGamelvl = Nothing %> Game Level When I call up the ASP page, the page appears, but the dropdown box is empty. What am I doing wrong?
Finding Out if a User Has Disabled Cookies
by DevX Pro
How do I find out if a user has disabled cookies?
Getting Recordsets With Remote Data Services
by Manoj K.
There are basically two ways to get recordsets with Remote Data Services (RDS). You can either use the system-provided RDSServer.DataFactory object or you can write your own full-blown custom ...
Counting the Number of Records in a Recordset
by Manoj K.
One of the handy features of working with the ActiveX Data Object (ADO) is the ability to load the results of SQL select statements into a Recordset. Once you have loaded the Recordset, you can ...
Encapsulate Your Code
by Manoj K.
Preventing a Browser From Caching a Web Page
by Manoj K.
Each browser has its own way of managing whether or not a page is cached. You can prevent a browser from caching a Web page programmatically by setting the Response.Expires method to 0.
Enhancing Browser Page Loading Performance
by Manoj K.
If your ASP application is experiencing browser page loading performance problems, you may want to consider implementing one or both of the following techniques. First, a fairly easy way to ...
Use 'Response.IsClientConnected' to Check Whether the Browser Is Connected
by Manoj K.
When a browser requests an ASP page from the Web Server, but does not wait for the entire page to be downloaded, the server continues to process the request, wasting valuable CPU cycles. If your ...
Reformat User-Entered Data Before You Validate
by Manoj K.
If you expect a user to enter a numerical value in a text box, you'll want to do some data validation on the number. But suppose he's included a dollar sign in the front of an otherwise legitimate ...
Pass Variables From Page to Page
by Maheshwar D
We can pass variables from page to page with the following ...
Displaying Server Variables
by Deepak Pant
ServerVariables' collection of request objects provides vital information about the client browser, HTTP header, etc. During the development of a web application, we use various variables of this ...
Changing the ScriptTimeout
by Maheshwar D
The default setting for ScriptTimeout is 90 seconds. For IIS 3.0, it is located in the system registry where we can easily change it to another value. It is advisable to set it to a lower value, and ...
A Smart Ceiling for a Ratio of Two Integers
by Eugene Zak
I often use the following trick in my code. ...
81-100 of 432     Previous     Next
Thanks for your registration, follow us on our social networks to keep up-to-date