Click here to Skip to main content
15,882,063 members
Articles / Database Development / SQL Server

Generic Database Class Using ADO to Execute Stored Procedures

Rate me:
Please Sign up or sign in to vote.
3.50/5 (7 votes)
3 May 2001 93.7K   4.1K   37  
Use this class to separate all database calls hidden to the callers. Nobody has to take care of how database retrieval is going on!
// DBTier.idl : IDL source for DBTier.dll
//

// This file will be processed by the MIDL tool to
// produce the type library (DBTier.tlb) and marshalling code.

import "oaidl.idl";
import "ocidl.idl";
	[
		object,
		uuid(468FBD1F-07EE-11D5-A7AC-000021254ABB),
		dual,
		helpstring("ISample Interface"),
		pointer_default(unique)
	]
	interface ISample : IDispatch
	{
		[id(1), helpstring("method SampleCall")] HRESULT SampleCall([in]BSTR bstrCourseName, [out,retval]long *lCourseID);
	};

[
	uuid(468FBD13-07EE-11D5-A7AC-000021254ABB),
	version(1.0),
	helpstring("DBTier 1.0 Type Library")
]
library DBTIERLib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[
		uuid(468FBD20-07EE-11D5-A7AC-000021254ABB),
		helpstring("Sample Class")
	]
	coclass Sample
	{
		[default] interface ISample;
	};
};

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.


Written By
Team Leader
United Kingdom United Kingdom
.Over nine years work experience in different area of Software Engineering especially developing solutions in Visual C++, Visual Basic 6.0 and C# with multi tier architecture.
.Proficient in object-oriented analysis, design and programming especially in distributed client/Server environments.
.Extensive experience in WEB based software engineering using ASP.NET/ASP.
.Vast experience in designing/developing/implementing complex business applications in banking domain.
.Good work experience in Database programming using stored procedures, triggers and generating complex queries using Oracle and SQL Server 2005.

Comments and Discussions