Click here to Skip to main content
15,884,986 members
Articles / Desktop Programming / Win32

dbAx: a C++ Library for ActiveX Data Objects (ADO)

Rate me:
Please Sign up or sign in to vote.
4.93/5 (24 votes)
21 Jan 2009CPOL4 min read 103.8K   2.4K   98  
C++ class wrapper for ADO
CREATE DATABASE CardFile
Go

USE CardFile

CREATE TABLE [CardFile].[dbo].[ACCOUNT] (
	[AccountID] [varchar] (32) NOT NULL ,
	[Name] [varchar] (50),
	[Address] [text],
	[Phone1] [varchar] (20),
	[Phone2] [varchar] (20),
	[Email] [varchar] (128),
	[Note] [text] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [CardFile].[dbo].[CONTACT] (
	[AccountID] [varchar] (50) NOT NULL ,
	[Name] [varchar] (50) NOT NULL ,
	[Title] [varchar] (50),
	[Phone] [varchar] (20),
	[Extn] [varchar] (10),
	[Email] [varchar] (128),
	[Note] [text],
	[PhotoID] [image] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO


SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS OFF 
GO

CREATE PROC get_Contacts (@AccntID varchar(32) ) AS
SELECT * FROM Contact WHERE Contact.AccountID = @AccntID
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Unknown
I work almost exclusively with C++ and database applications and manage the IT concerns for the engineering department of a large food processing company. As such, I get involved with add-ons to existing commercial software, SCADA, interfacing with industrial components (PLC’s, automated weight checking machines, etc.) and other pet projects (currently working on v4.0 of my own document management app).

I get totally fed-up, frustrated and thoroughly delighted with programming and computers, but always remember the sage words of an old lab tech from my Air Force days; “There was never a statue erected to the man who left well enough alone.” I’ll be at it again tomorrow!

Comments and Discussions