devxlogo

Tip Bank

Use the Conditional Operator Judiciously

The conditional operator,?, is a shorthand for a sequence of if-else statements. Although it has legitimate uses, in many cases programmers tend to misuse it, thereby producing unintelligible and buggy

Perform Some Common Database Chores

These several database functions work together and perform various utility functions, such as checking if fields and tables exist, creating fields and tables, and so on. The interface hides all

Password Protect an Access Database

For simple Microsoft Access security, set the database password from the Security item under the Tools menu in Access, select Set Database Password, and enter a password. To use the

Generate Random Strings

This code helps test SQL functions or other string-manipulation routines so you can generate random strings. You can generate random-length strings with random characters and set ASCII bounds, both upper

Use Name Parameters With Oracle Stored Procedures

When executing an Oracle stored procedure, use the named parameter convention. In place of this code: OraDatabase.ExecuteSQL _ (“Begin Employee.GetEmpName (:EMPNO, :ENAME); end;”) Use this code:OraDatabase.ExecuteSQL (“Begin Employee.GetEmpName _ (empno=>:EMPNO,

Check Whether Password Includes a Number

Question: How can I check if the password that a user inputs has at least one numeric character? Answer: The best way to check whether what the user has entered