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 > Database Development > Data Access

Data Access - Page 3

41-60 of 699     Previous     Next
Right-Justification of Output
by Danny Kalev
To right justify the output of cout, call the width() function with the size of the output screen (in characters) as an argument. In the following example, the program calls width() to ...
Alternatives to ios::nocreate and ios::noreplace
by Danny Kalev
In pre-standard C++, certain implementations of <fstream.h> offered the flags ios::nocreate and ios::noreplace for controlling file creation. These flags were too platform-specific and ...
Filtering Input in scanf()
by Danny Kalev
You can force scanf() to read only specific characters from the input source while ignoring all the rest. Alternatively, you can force scanf() to read all input characters except the ones ...
If Your Compiler Doesn't Support snprintf() Yet
by Danny Kalev
Sometimes, sprintf() is unavoidable. For example, when compatibility with C is paramount, Sprintf() has a safer version called snprintf(), which doesn't write past its buffer's limits. However, ...
Using Addbatch and Executebatch
by Tri Do
If you insert/update/delete multiple times to the database, you ...
How to Compact Databases Using ADO
by Filipo Mor
To compact MDB databases using ADO, just include a reference to the 'Microsoft Jet and Replication Objects 2.6 Library' (distributed with the MDAC 2.6 package) in your VB project. The code ...
Fast Execution of SQL Statements
by Nitin Kumar
Let's start with a code ...
Converting Strings From One Character Set To Another
by Espen Andersen
The following function is an efficient way of converting strings from one character set to another. Using an array of 256 characters as a conversion table, the attached function replaces any ...
Creating an MSACCESS Database through VB
by Nazmul Siddiqui
I have frequently seen bulletin board requests on how to create MSACCESS databases with VB. To do this, add a reference to the Microsoft DAO _._ Object Library (I am using Version 3.6 for the ...
Optimizing String Classes in Java Code
by Naveet Gupta
The String class is probably one of the most used classes in Java. String concatenation via the
Another Way of Handling Null Database Fields
by Stuart Hallows
A compact way of handling null database fields is as ...
<iostream.h> or <iostream>?
by Danny Kalev
Although the <iostream.h> library was deprecated for several years, many C++ users still use it in new code instead of using the newer, standard compliant <iostream> library. What are the ...
Octal and Hexadecimal Output
by Danny Kalev
By default, cout displays integral values as decimal numbers. You can override this setting and have integral values displayed in hexadecimal and octal notations by using the 'hex' and 'oct' ...
Controlling Floating Point Precision
by Danny Kalev
You can override the default number of digits after the decimal point by calling the precision() member function of an ostream object. The following program first displays six digits after the ...
Switching Between Fixed and Scientific Notation
by Danny Kalev
By default, iostream objects are set to display floating point values in fixed notation. To change this, you apply the 'scientific' manipulator to an output stream ...
Use SET When Referencing Values in an ADO RecordSet
by Andrew Holliday
When referencing recordset values in your ASP code, don't use the commonly used
Don't Cache ADO Database Connections in the ASP Application Object
by Andrew Holliday
If you do, then all the pages will fight for the use of this connection. In addition, don't cache an ADO connection in the Session object. If you do, a database connection will be created for ...
Null Handling in VB6
by Nazmul Siddiqui
A simple way to get around having to handle Nulls in fields from recordset is to concatenate a zero length string at the end of the field value, as illustrated in the following ...
Finding Last Day of the Month IN SQL Server
by Andrew Holliday
Certain applications require business logic to determine the last day of the month. This is the case for accounting applications that perform such tasks as invoice processing and customer billing.
Emitting a Beep
by Danny Kalev
The escape sequence '\a' is the ASCII code for a beep. To emit a beep from your program, output this escape sequence to the standard output. For ...
41-60 of 699     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