Subsonic - The Perfect Database DAL Creator

by Fadl Assaad 12. October 2009 14:00
Share on Facebook

This topics may interest both beginner and advanced programmers,

We know that programmer always want to be more faster and more productive so he always search for helpful tactics, ways or tools that help him create big project in lesser time. But unfortunally we knew that dealing with database is the bigger part in a program and sometimes, if we have a big project, designing and engeneering of he Data Access Layer (DAL) of the project may take a lot of time which cause fatigue and Boredom ...

Is that right ? Not any more ...

Greate news for all, thanks for the Subsonic, a new technologie that read your database and converted automatically to code for example if we have a database that contains a table: Employees( ID, Name, Telephone).

The old fashion code is:

Dim Con As New SqlClient.SqlConnection("Data Source=Local;Initial Catalog=MyDatabase;Persist Security Info=True;User ID=sa;Password=sa;Pooling=true")
Dim sql As String = "Insert Into Employees(ID,Name,Telephone) Values(@ID,@Name,@Telephone)"
Dim da As New SqlClient.SqlCommand(sql, Con)
Try
   Dim oID As New SqlClient.SqlParameter("@ID", SqlDbType.Int, 8, ParameterDirection.Input)
   Dim oName As New SqlClient.SqlParameter("@Name", SqlDbType.Text, 50, ParameterDirection.Input)
   Dim oTelephone As New SqlClient.SqlParameter("@Telephone", SqlDbType.Text, 12, ParameterDirection.Input)
   oID.Value = txtID.Text
   oName.Value = txtName.Text
   oTelephone.Value = txtTelephone.Text
   da.Parameters.Add(oID)
   da.Parameters.Add(oName)
   da.Parameters.Add(oTelephone)
   Con.Open()
   da.ExecuteNonQuery()
   Con.Close()
Catch ex As Exception
   Throw ex
End Try

But with Subsonic:

Dim oEmp As New Employee
oEmp.ID = txtID.Text
oEmp.Name = txtName.Text
oEmp.Telephone = txtTelephone.Text
oEmp.Save()


That's it. Quiet Easy, Quiet Simple.

Also Read the Subsonic pdf file:

Tags: , , ,

Database | Programming

MS Access 2003 for beginners

by Support 15. June 2009 18:56
Share on Facebook

Welcome to Microsoft Access 2003 for beginners. This tutorial is designed for users who are new or only have little experience using Access 2003. It introduces fundamental database concepts and operations and illustrates how they are performed in Microsoft Access 2003. This tutorial will cover all of the main features and functions of Microsoft Access 2003.

Tags:

Database | Programming | Training Courses

Transact-SQL Using SQL Server 2005

by Support 15. June 2009 18:48
Share on Facebook

This course will introduce you to the Transact-SQL (T-SQL) language. T-SQL is used to interact with your relational database for such tasks as retrieving records from your tables, updating, inserting and deleting data. This course is geared towards the absolute beginner and will give you the foundation needed to becoming a T-SQL expert.

Tags: ,

Database | Training Courses

Online Chat

About The Skills Way Center

 Welcome!   This is Skills Way Center, A computer training center located in Mina, Tripoli, Lebanon.
More...

   

 

free counters

Google Translator

Recent Comments

Comment RSS
Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 Skills Way Center Blog