The Latest

DevX - Software Development Resource

Initialize Class’s Data Members Easily

Consider the following class: class Book { private: char ISBN[11]; int year bool in_stock; char name[100]; // Related Posts Microsoft to Release Windows 10 SDK Preview This MonthSamsung Galaxy Z

DevX - Software Development Resource

Opaque Pointer

Question: What exactly is an opaque pointer? Answer: The term “opaque pointer” is used in component-based programming, e.g., COM and CORBA. It refers to a pointer to an object of

DevX - Software Development Resource

Bit Classes

Question: Are there power bit set classes around that can do what Verilog, VHDL can do so easily? a[3:2,0] = b[4:1] & c[5]; // collections of width n mixed with

DevX - Software Development Resource

dynamic_cast implementation

Question: How does dynamic_cast work? How is it implemnted in compilers? Answer: dynamic_cast accesses the runtime type information that C++ automatically generates for every polymorphic class. This information is stored

DevX - Software Development Resource

Custom Right-Mouse-Click Menus

Question: How do I customize the mouse’s right-click menu? That is, instead of Cut, Copy, Paste, Select All, Delete in Edit-Masks, etc., I would like to display my custom menu,

DevX - Software Development Resource

Formatting Data in Tabular Form

Question: I use SQL 6.5 in an industrial setting. I have an application that writes a new record into the database every time a pallet blocks a photoswitch. After 24

DevX - Software Development Resource

Verifying Whether a String Contains a Number

Question: Is there a function that gives me a simple way to know whether a string contains a number or not? I’ve already done something with ASCII values, but this

DevX - Software Development Resource

Counting Specific Records

Question: How do I count the records for a specific field? For example, I’m building a table for homes in a county. In the table are fields for cities and

DevX - Software Development Resource

Group By Statement

Question: How do I use the Group By statement in SQL Query? Answer: Group By is a way to collapse a result set around a textual value summarizing its contents

DevX - Software Development Resource

Filtering Junk E-mail from My In-box

Question: Could you please explain how to trap the e-mail ID from the In-box, so that I can filter my incoming junk mails? Answer: Filtering junk mail is tricky business

DevX - Software Development Resource

Journal Entries Appearing to Users

Question: Why do Journal entries within a (slightly) customized contacts database in Public folders only appear to the user who logged the Journal entry? All other fields in the contact

DevX - Software Development Resource

Redundancy After SELECT

Question: I need to have a result from a SELECT query with all the rows containing “word1” in column 1 and all the rows containing “word2” in column 2. If

DevX - Software Development Resource

ShortPathName – Convert a long file name to 8.3 format

Private Declare Function GetShortPathName Lib “kernel32” Alias _ “GetShortPathNameA” (ByVal lpszLongPath As String, _ ByVal lpszShortPath As String, ByVal cchBuffer As Long) As LongConst MAX_PATH = 260′ Convert a long

DevX - Software Development Resource

The number of days in a month

You need just one-line function to evaluate the number of days in a month (while taking leap years into account, of course). The trick is to use the DateDiff and

DevX - Software Development Resource

LongPathName – Convert a 8.3 file name to long format

Private Declare Function GetLongPathName Lib “kernel32” Alias _ “GetLongPathNameA” (ByVal lpszShortPath As String, _ ByVal lpszLongPath As String, ByVal cchBuffer As Long) As LongConst MAX_PATH = 260′ Convert a short

DevX - Software Development Resource

Losing Decimal Places While Updating a Column

Question: I have two columns in a table called “bak”: distance, and trig. The distance value is equal to 1/trig. When I perform the following query: update bakset distance =

DevX - Software Development Resource

Number of Records Returned By a Query

Question: How can I get the number of records returned by a query without cycling through all the records and counting each one? Answer: Have you tried SELECT COUNT(*) FROM

DevX - Software Development Resource

Automatic Mail Forwarding

Question: How can I get Exchange to forward e-mail to an AOL or ATT account automatically? We have traveling users who have AOL or ATT accounts and would like all

DevX - Software Development Resource

Loading a Database into Oracle

Question: I am a student. Is there a way to load a database into Oracle to run my exercises? Answer: I’m not sure I can help you because there’s more

DevX - Software Development Resource

VB5-to-SQL 7.0 Connection Problem

Question: I need your assistance to solve the following: I am using an RDO connection to connect to a SQL 7.0 database, and I am using the server-side cursor technique

DevX - Software Development Resource

Pulling Values Together from Two Fields

Question: How do I merge two values from separate fields using SQL? An example would be taking the LastName field and placing it before the FirstName field like this: “LastName,

DevX - Software Development Resource

Doing a GROUP BY Statement

Question: How do I do a “group by” SQL statement? I want to return all rows and columns with ** records. Here is the data sample: columnA columnB columnCAAA 2334

DevX - Software Development Resource

Outer Join Problem

Question: I am having trouble getting the following type of join to work. I have three tables: Application, College_hist, and School_Info. Application has student ID numbers that identify the person

DevX - Software Development Resource

Leaving Messages on the Server

Question: I have upgraded from Outlook Express to Outlook 98. Previously I was able to leave messages to a particular e-mail recipient on the server. With Outlook 98 I no

DevX - Software Development Resource

Parameter Setting

Question: I need to know how to write SQL to ask for a date range and run the query on that range. Can you help me? Answer: I think it

DevX - Software Development Resource

Moving a SQL Database to Another Server

Question: I have a SQL database on our production NT server and need to move the database to another NT server. I used the Database/object transfer in Enterprise Manager to