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 4

61-80 of 699     Previous     Next
Streams and Pointers
by Danny Kalev
Look at the following program. It compiles correctly under every standard-conforming compiler. At first, this may seem surprising because seemingly, because it's impossible delete an object which is ...
String Equality
by DevX Pro
When you compare two objects through the "== operator," Java checks for reference equality. For example, if you create two String objects with "new" keywords and initialize them with same value and compare them with if(s1==s2), it returns false because the references are not same. But if you initialize two Strings to the same inline string value (String s1 = "s", s2 = "s";) the same test returns true. Why is this?
Using "sprintf" function in Java
by Nikhil Ranjan
In C, the "sprintf" function will format a string, including integer values, to ...
Maximum Number of Characters
by DevX Pro
I'm reading approximately two million characters into an array. The max number of elements that Borland Turbo C++ 5.02 allows me is not enough. Can I declare this array to be a lot bigger or allocate more memory for this array?
Generating a Unique Filename
by Danny Kalev
To generate a unique filename that won't conflict with any other files that exist in the current directory, use the tmpnam() function declared in <stdio.h> as ...
Creating a Temporary File
by Danny Kalev
Many applications create temporary files that exist as long as the program is running and are later discarded. For example, a Web browser can store a list of pages that have been viewed during the ...
Reading Strings that Contain White Spaces
by Danny Kalev
The std::getline() functions reads data from an input stream and writes it to a string object. Unlike cin's >> operator, getline() also reads white spaces, which makes it useful for reading strings ...
Logon Improvements
by Dennis Rehm
If your application connects to Microsoft SQL Server, you can use two features to make your login easy and low maintenance. The first choice is to use OLE DB instead of ODBC. This eliminates the ...
Reading a String from a File
by Danny Kalev
<fstream> classes overload the operators >> for reading from a file and << for writing to it. There are several overloaded versions for each operator, one for each built-in type. In ...
Mini Database Strategy
by DevX Pro
I have recently written a small dialog based MFC app to carry out a few performance calculations for our product. I have managed to get o/p to the printer and that's OK. What I want to do now is to enable the saving of the data from the calculation in some mini database to be reviewed at a later stage—either through an interface which I will add to the program or through an existing app (notepad/excel or whatever). How should I approach this? Do I create a structure of the data I want to save and serialize it onto one long file on disk? Do I create a class that can serialize itself? I'll try and figure out the details by myself (I hope) but I am just not sure what the general solution should be.
Using cin.good() to Check Inputted Numbers
by DevX Pro
I'm trying to make a calculator program using switch statements for +,-,* and /. I know how to handle and divide by zero error. I also have to use the cin.good() function to check whether the inputted numbers or the requested operation is good. Whenever I try to use the cin.good() function, I get an error saying that 'good' is an undefined variable. What can I do, and how should I use it correctly?
Checking the State of a Stream
by Danny Kalev
The iostream family of classes provides the following member functions and operators for checking the stream's ...
by DevX Pro
Which is faster, LOCATE (without parameters) or GO TOP? How fast is the one from the other? Why is one faster than the other?
Escape Sequences
by Danny Kalev
Certain special characters are represented as escape sequences. An escape sequence begins with a \ (backslash) followed by an alphanumeric character. For example, the \n escape sequence represents ...
Auto-Incrementing Key Field
by DevX Pro
Is there a command in Visual FoxPro 6.0 that is similar to the Microsoft Access "AutoNumber" feature? The field automatically generates a record number for each record.
Creating a New ID
by DevX Pro
I am new to VFP. I want to create a unique number for a customer ID field in a table. The VFP sample program "tastrade" simply uses NEWID() as the default value for the given field. When I try the same in a new database I get the error message, "NEWID.PRG does not exist." This is simple to do in Microsoft Access, but I have spent a couple of hours on it already with VFP. How do I create a unique number when entering new data into a row of a table? Thank you for your help.
ODBC Installation
by DevX Pro
I'm trying to install the of Informix for WinNT and during the process I get error number 126?
Writing to File from Several Functions.
by DevX Pro
The code below creates a file, Basket.doc, in the current directory. I am using a compiler with a component I would like to place in fWrite() to let me vary the entire path and file name (i.e. outName). The trouble is I want outSide to be valid from fFinish(), too. Do I need a global variable or a pointer of some kind? char outName[] = "Basket.doc"; ofstream outSide(outName); void fWrite() { outSide
Hardcoded Char Arrays
by Danny Kalev
Does your C++ compiler accept the following ...
ResultSet Interface
by DevX Pro
If ResultSet is an interface, then why can we call methods like next(), isLast() etc. without defining the method body anywhere in the program? As I understand it, in an interface, methods are only declared but not defined.
61-80 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