Avoid Java Null Pointer Exceptions with SQL-J
Direct access of a NULL in a column does not cause any problems in SQL-J. If you use that value as a parameter in a Java method or as a
Direct access of a NULL in a column does not cause any problems in SQL-J. If you use that value as a parameter in a Java method or as a
If you’ve ever used SQL commands against the ADO Connection object, you might have had a problem allowing the user to enter text that contains an apostrophe: ADOCon.Execute “Insert Into
ADO and RDO do not support Oracle cursor types; neither Microsoft nor Oracle drivers provide appropriate conversion. As a result, you cannot use Oracle stored procedures from VB or Active
It’s often useful to sort a DBGrid field in either descending or ascending order. You do this by using the HeadClick event and the DataField property of columns. You must
When you write Insert statements, it can be difficult to accommodate the possible values end users might enter into a textbox. The most common task is replacing single quotes with
If you use an MSFlexGrid control to display data returned in an ADO recordset, you can use this code to dynamically populate the grid?including the header row?with the information in
In Microsoft Knowledge Base article Q217114, “How to: Implement Array Arguments in Visual Basic COM Objects for Active Server Pages,” Microsoft says you can’t pass an array to a COM
The MSFlexGrid tries to automatically determine how to justify text. If the first character is numeric, then that cell will be right-justified. If it is an alphanumeric character, then that
If you usually use DSN-less connections with ADO, you know it can sometimes be a pain to figure out the correct connect string. In that case, you can let the
Often you need a data structure similar to a two-dimensioned array or collection, but you need to manipulate it. For example, you need to sort on certain columns, filter certain
Sometimes you want to give your DataGrid the ability to edit fields, while the original data in the field is highlighted. Normally, you can click on the field to start
If you’re developing multiuser Jet-based applications, you probably know about Microsoft’s msldbusr.dll. It allows you to read the Jet lock files and get the correct number of connected users and
Suppose you have a table with this field: Customer_Code You can retrieve the field in many ways: rs.(0)rs(“Customer_Code”)rs.fields(0)rs.fields(“Customer_Code”)rs.fields.item(0)rs.fields.item(“Customer_Code”) In VBScript, the versions that use field indexes instead of names are
Consider the Data Definition Language statements: “ALTER TABLE [My Table] ADD COLUMN [My New Field] Single” and “ALTER TABLE [My Table] ADD COLUMN [My New Field] Double”. According to Microsoft
Most of my end users use laptops, which can have a wide variety of spreadsheet software installed. I often use this function when working with database tables or queries to
When building SQL statements, use the Tag property to hold the Field Name and Data Format. I use a naming convention of str, int, dat, and so on to determine
If you can be sure that your users are only running Internet Explorer 4.0 or higher, you can take advantage of Remote Data Services (RDS), now part of MDAC 2.x.
The most common way to call a script function is to have an element trap an event, which in turn calls the function, as in: Click here But what if
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 business
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
When you trap a keyboard event with any of the keyboard event handlers (onKeyUp, onKeyDown, or onKeyPress), the event object’s keyCode property contains the character value of the key that
One of the most common mistakes developers can make is to extensively use global variables. While they are sometimes necessary, global variables can cause problems in code that are both
Microsoft’s IE4 supports the ability to change just about any CSS1 style attribute dynamically. To access an element’s style, use the style object property that corresponds to the style attribute.
If you want to compare the values in two different textboxes, and you don’t want case to be a factor in whether or not the values are equivalent, you can
VBScript’s random number generator, Rnd, only generates random numbers between 0 and 1. If you need numbers in a different range, use the following formula: Int ((UpperBound – LowerBound +
If you are using a numeric IP address instead of a computer name to identify your Web server when creating an application, you may encounter an authentication error. This happens
In the HTML 3.2 specification, there was no way for an author to associate text with an intrinsic control such as a radio button or text box. Unlike an tag,
When using the element property innerHTML to change the text of an element, make sure that you don’t put hard carriage returns inside of the text string. Doing so will
When you create a Web site that includes frames, you can easily use a hyperlink in one frame to change the contents of a second frame. But you may frequently
If you want to protect your pages from being opened within a frame, use the following script: This code checks to see if this page is the top page (i.e.,