The Latest

DevX - Software Development Resource

Useful STL Terminology

Here are some key terms that you may find useful for reading Standard Template Library (STL) literature and documentation. ContainerA container is an object that stores objects as its elements.

DevX - Software Development Resource

Declarations With Implicit int Aren’t Permitted

Does your compiler accept the following declarations? volatile x; const y = 0; In pre-standard C++, the default type in such incomplete declarations was int. Thus, the first declaration would

DevX - Software Development Resource

Blocking Object Copying and Assignment

To block copying and assignment of an object, explicitly declare the assignment operator and copy constructor private. Don’t define them, (there’s no point in defining them because they can’t be

DevX - Software Development Resource

Accessing SQL and Visual Basic

Question: I am developing a database program using Access and Visual Basic. I want to display data in a form where the data comes from two tables. For example, the

DevX - Software Development Resource

Ordering Query Output By Two Fields

Question: I want to order the output of my query by two fields. Is this possible? That is, if two values are the same, I want the output ordered by

DevX - Software Development Resource

Datatype Decision

Question: I have a field that stores lots of data (up to 8,000 characters). I thought that I could maybe save disk space if I stored this data as varbinary

DevX - Software Development Resource

Autonumbering in SQL

Question: I am having to reformat data for addition to a database. My current struggle involves an identification field for certain records. In the new database it needs to be

DevX - Software Development Resource

FoxPro 2.5

Question: Is there a 2.5 patch for running on fast computers? Answer: The only patch that I am aware of is the 2.6 patch. Related Posts BT amplifies AI usage

DevX - Software Development Resource

Indexing Remote Views

Question: We have to connect VFP to SQL Server, and we have a lot of non-structural index files for tables. We’ve created remote views for the tables and need to

DevX - Software Development Resource

List Structure

Question: How do I control the output format for the list structure command so that it always fits on a page (portrait or landscape)? Is there another way to get

DevX - Software Development Resource

Location of Wizards

Question: Every time I try to use a wizard, I get the following error message: “Cannot find the Wizard Program.” The wizards are located in the same folder that I

DevX - Software Development Resource

Adding Controls to Pageframes

Question: How do I place a text box on a pageframe (or anything for that matter)? Answer: Right click the pageframe in the form designer or class designer and choose

DevX - Software Development Resource

Setting dbf File Attributes

Question: When using the following commands to modify a dbf file, I find the file is not accessible for modification: USE MODIFY STRUCTURE How do I modify the file structure?

DevX - Software Development Resource

Checking Alphanumeric Characters

Question: How do I check strings that have only alphanumeric characters? Answer: When you say alphanumeric, I assume you mean that the characters are in one of the following domains:

DevX - Software Development Resource

Querying Date Fields

Question: I have a table with column called Date, which stores date record, that was entered in smalldatetime format (e.g., 2000-06-01 00:00:00). I need to write a stored procedure that

DevX - Software Development Resource

Query to a Text File

Question: I would like to create a stored procedure that runs a query and outputs the results to a text file and allows me to add extra delimeters and static

DevX - Software Development Resource

Insert Statement Problem

Question: I am facing a problem with the following SQL stored procedure: CREATE PROCEDURE usp_CreateAdminUser /*Input Parameters for the Create Admin User */ @FullName varchar(100), @Telephone varchar(50), @Email varchar(50), @Address1

DevX - Software Development Resource

SQL Server Stored Procedures

Question: I have a stored procedure that takes a costcenterid (int) as an input parameter. The user wants to search on an unspecified number of costcenters each time. I use

DevX - Software Development Resource

Dynamic Variables and Stored Procedures

Question: I need to pass the @TheVar variable to the stored procedure’s IN statement but I keep getting zero records. If I type this statement into the SQL… WHERE Name

DevX - Software Development Resource

Creating Tables with Variable Names

Question: Is it possible to create tables in stored procedures using a variable for the table name? For instance: declare @MyNameset @MyName = ‘dbo.Unique_Name’create table @MyName … This obviously doesn’t

DevX - Software Development Resource

Invalid Object in SQL 7.0

Question: I write a stored procedure and it works fine. But when I do write a “select statement” as below: “select * from sp_name” I get an error message: “Server:

DevX - Software Development Resource

Invalid Seek Offset

Question: What causes the error message”Invalid seek offset”? Answer: This message is often a symptom of a corrupted index. You may want to rebuild the indices of whatever table you

DevX - Software Development Resource

The AVE Code Find Add-in

This add-in augments the VB IDE with the capability to search a string or a pattern across all the modules of all the projects loaded in the environment. Better yet,

DevX - Software Development Resource

Replicate a string of any length

The String$ function can replicate only 1-char strings, so it seems that you need a loop to duplicate strings that contain 2 or more characters. However, this is a one-liner

DevX - Software Development Resource

Export to a text file with the GetString method

The GetString method of the Recordset object returns a formatted string that contains all the values in each field and each row in the recordset, with your choice of column

DevX - Software Development Resource

Faster string appending with Mid$ command

As you probably know, the “&” operator is rather slow, especially with long strings. When you have to repeatedly append chucks of characters to the same variable, you can speed