To use EasyThatDB You need first to add it's reference to your project.

After That you need to Create a new object of DB Class:

 

C#

DB obj = new DB("Your connection string");

 

VB

Dim obj As New DB("Your connection string")

 

Then you can call the methods to do the operations on the Database.

 

1-SELECT:

Parameters:

Table Name (Ex: User), Condition (Ex:[User_ID] > 10)

 

C#

 

obj.Select("audio", "[audio_ID]='1'");

 

 

VB

 

obj.Select("audio", "[audio_ID]='1'")

 

 

Return a dataset with data.

 

2-INSERT

Parameters:

Table Name(Ex: User), Values (The values in order with it's columns Ex:'1','amr','testing'. Also values should be surrounded with ' single quote)

 

C#

 

obj.Insert("audio","'test','2012-5-3'");

 

 

VB

 

obj.Insert("audio","'test','2012-5-3','service','tst','false','uniquewords'")

 

Return the ID of the inserted Row.

 

3-UPDATE

Parameters:

Table Name (Ex:User), Columns (Values to update in columns Ex: [User_Name]='New Name', Condition (ex: [User_name]='Wrong')

 

C#

 

obj.Update("User", "[User_Name]='New Name'", "[User_ID]='1'");

 

VB

 

obj.Update("User", "[User_Name]='New Name'", "[User_ID]='1'")

 

Return 0 if success.

4-DELETE

Parameters:

Table Name (Ex: User) , Condition (Ex:[User_ID]='1')

 

C#

 

obj.Delete("User", "[User_ID]='1'");

 

VB

 

obj.Delete("User", "[User_ID]='1'")

 

Return 0 if success.

That's all. 

Last edited Aug 4, 2013 at 12:16 PM by amrswalhadp, version 2

Comments

No comments yet.