June 15, 2000

Assigning a Specific Address to a Pointer

Question: How do I assign a specific address location to a pointer (e.g., If I want *ptr to point to 0x5800FF)? Answer: You have to use an explicit cast: void *p;p = reinterpret_cast < void* > (0x5800FF); Note that this operation is bug-prone and may not be supported on certain

Threads in C++

Question: Is it possible to have threads in C++ like you can in Java? Answer: Sure you can have threads in C++. However, unlike Java, C++ uses external thread libraries for this purpose. For example, Windows programmers normally use the Win API thread functions or MFC classes; Unix and Linux

Truncate Table

Question: Is there a fast way to delete all the rows (in other words, truncate) the table in Informix 7.xx? Answer: There is no truncate command. The fastest way to do this is to use dbschema to recreate the structure of the table, create the table with a new name,

REPORT Functionality Within Informix

Question: What does a return code of 100 mean on a START REPORT statement? Answer: If this is an Informix error, and it probably is, Informix lists the following error message: -100ISAM error: duplicate value for a record with unique key. A row that was to be inserted or updated

PDQ and Xtree

Question: How can I set the PDQPRIORITY for every user in the database? I am also trying to get Xtree to work on the same system so I can better analyze user queries but can’t figure out how to do that either. Answer: Set your PDQPRIORITY in your oninit file.