Click here to Skip to main content
15,887,135 members
Articles / Database Development / SQL Server

Overview of XQuiSoft Data Using the Provider Pattern (Open Source)

Rate me:
Please Sign up or sign in to vote.
3.59/5 (12 votes)
16 Jun 2009BSD8 min read 40.7K   28  
A data abstraction layer for .NET applications. Write your application code to be database neutral. Swap out the type of database your application uses without updating or even recompiling your business components.
if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Demo_DeleteEmployee]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	select 'Missing procedure Demo_DeleteEmployee'
else if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Demo_GetEmployee]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	select 'Missing procedure Demo_GetEmployee'
else if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Demo_GetEmployeeSubordinates]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	select 'Missing procedure Demo_GetEmployeeSubordinates'
else if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Demo_SaveEmployee]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	select 'Missing procedure Demo_SaveEmployee'
else if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Demo_Employee]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
	select 'Missing table Demo_Employee'
Else If not exists 
	(	select * from dbo.syscolumns where name = 'EmployeeID' and id =
		(select id from dbo.sysobjects where id = object_id(N'[dbo].[Demo_Employee]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
	)
	Select 'Missing column EmployeeID on table Demo_Employee'
Else If not exists 
	(	select * from dbo.syscolumns where name = 'ManagerID' and id =
		(select id from dbo.sysobjects where id = object_id(N'[dbo].[Demo_Employee]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
	)
	Select 'Missing column ManagerID on table Demo_Employee'
Else If not exists 
	(	select * from dbo.syscolumns where name = 'FirstName' and id =
		(select id from dbo.sysobjects where id = object_id(N'[dbo].[Demo_Employee]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
	)
	Select 'Missing column FirstName on table Demo_Employee'
Else If not exists 
	(	select * from dbo.syscolumns where name = 'LastName' and id =
		(select id from dbo.sysobjects where id = object_id(N'[dbo].[Demo_Employee]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
	)
	Select 'Missing column LastName on table Demo_Employee'
Else select '*' /* latest version */
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 BSD License


Written By
Web Developer Nexul Software LLC
United States United States
Mike has worked in the .Net platform since the beta 2 release of version 1.0. Before that he worked on VB6 windows forms applications automating other applications such as AutoCAD and "Intent".

Mike has released a number of open source applications in javascript and C#.Net. Most of them can be found on github.
github/michael-lang

You can find older .Net open source projects on sourceforge at:
http://sourceforge.net/users/versat1474/

Mike is currently blogging at candordeveloper.com

Comments and Discussions