The Latest

DevX - Software Development Resource

The Organization of STL Header Files: Container Classes

STL is divided into two major categories: containers and algorithms. Additional components are iterators, function objects, numeric facilities, allocators, and miscellaneous utilities. STL containers are defined in eight different header

DevX - Software Development Resource

Guidelines for Writing Portable Code

As opposed to what most people believe, portability does not guarantee that you can compile and run the same code on every platform without any modifications. Although it is sometimes

DevX - Software Development Resource

Load a Grid from a SQL Statement

Use this code for a generic routine to load a grid from a SQL statement. The example is for Remote Data Objects (RDO) and Sheridan Software Systems’ grid, but it

DevX - Software Development Resource

Invisible Control Placement on MDIForm Client Area

With VB4 or higher, you can place invisible controls-such as the standard Timer and CommonDialog or UserControls built with VB5 that have their InvisibleAtRuntime property set-directly on an MDIForm. In

DevX - Software Development Resource

A Better Use for StrConv

When using proper names, you sometimes need to capitalize the first letter of each word. For example, you need to convert “john smith” into “John Smith.” With VB3, you had

DevX - Software Development Resource

Max users

Question: I have 20 user licenses. During some activities, users are being logged in two or three times. Thus I can hit a max user limit with only 9 actual

DevX - Software Development Resource

SQL Tutorials

Question: I am interested in learning SQL on my own and need to know if there are any tutorials or disks that I can obtain so that I can practice

DevX - Software Development Resource

SQL: querying records based on ORDER BY

Question: Can you make a query that returns records based on ORDER BY something? There may be mutiple instances, but I only want the one that is the very first

DevX - Software Development Resource

Establish Referential Integrity

Question: How do you Establish Referential Integrity between 2 tables so that when a ticket is deleted from the TICKETS table all associated information in the customer5 table will be

DevX - Software Development Resource

How to find the top percentage of users

Question: I want to find out the top 5%, 10%, and 30% customers based on their purchases. For example, my table looks like:CustomerID Purchase(in $)1 1002 500Up to 100 customers.

DevX - Software Development Resource

Designing a keyord search query in Access

Question: I’m still quite new to using SQL and I am designing a database in which I am cataloging resources owned by my company. I am attempting to create a

DevX - Software Development Resource

Error messages

Question: In SQL Server 6.5, what is the meaning of ‘Error States’? I get this message in a stored procedure.What are these states 1-27. Answer: These numbers provide the context,

DevX - Software Development Resource

SQL Substring searches

Question: How do you select all entries that contain a certain substring? Is there a function like InStr() in VB? Answer: Yes, Check out the charindex function which will Return

DevX - Software Development Resource

Coding blank spaces in a select statement

Question: After the line break in the code below, the blankspace between the quotes is not recognized. I am merely trying to indent the second line, but I get nothing.

DevX - Software Development Resource

Datatype – TEXT

Question: I have fields, in which the datatype is TEXT, and I need to know how I can insert and update data from these fields? Answer: If the size of

DevX - Software Development Resource

SQL Server Performance

Question: I have developed an application that processes about 40,000 records every time it runs. I am using ADO 2.1 and each record is returning about 100 columns of data,

DevX - Software Development Resource

Cascade Delete

Question: What is the syntax for doing a cascade delete in SQL? For instance, I have a table with a parent record that has child records in other tables, filtering

DevX - Software Development Resource

SQL UPDATE 2 TABLES

Question: In all the Foxpro 5.0 documentation, I can’t find an example on how to update the contents of a field ofa table based on another table. For example, table

DevX - Software Development Resource

Stored Procedures: Cursor variables

Question: When I run a stored procedure which uses cursors to do a selection of counts based on a view, it returns the correct (expected) numbers. However, when I rerun

DevX - Software Development Resource

SQL Adding Records

Question: What is the syntax for inserting multiple records into a single query. I have some files with thousands of records to insert and it’s too slow using Insert into

DevX - Software Development Resource

History of SQL

Question: Where can I find miscellaneous information about SQL on the web? If you know of anyuseful websites with history, general structure, etc…, of SQL, please let me know. Answer:

DevX - Software Development Resource

Setup for e-mail in SQL Server 7.0

Question: Currently, I use SQL Mail in SQL Server 7.0 with Outlook and Exchange Server. I am sure there were no errors during set up, but when I went to

DevX - Software Development Resource

Other tools besides BCP

Question: I’m looking for other tools for importing ASCII files to SQL server 7.0 without problems. At this moment I’m missing data and the tools can’t take care of it

DevX - Software Development Resource

Converting a return to a blank space

Question: I am using SQL+ through COBOL to include a 250 char notes field on a report. If the user has entered a return character in the field (Hex 0A),

DevX - Software Development Resource

SQL stored procedures from VB6

Question: We are always getting “stored procedure not found” error messages. We know it is on the server and we can access the db. Any clues? Answer: Well, if you

DevX - Software Development Resource

Condensing rows

Question: I’ve got a table structure that looks like the following:Customer TableCUST_IDNAMECODE_LISTCode TableCUST_IDCODE The code table can have any number of codes for each customer. I’m trying to find a

DevX - Software Development Resource

How to read data file into SQL tables

Question: I’m curious to know, if I have a file full of data separated by commas, how do I read stuff from that file into SQL tables? Answer: The fastest

DevX - Software Development Resource

Retaining query results

Question: How do I retain the results of a query for use in subsequent queries using SQL Server? Answer: Well, you could either INSERT or INSERT SELECT your query into

DevX - Software Development Resource

Deleting Tables

Question: Is there a SQL statement for deleting tables like there is for deleting data from tables? Something like:DELETE TABLE NAME or DROP TABLE NAME Answer: Yes indeed, Drop table