Ok. Let's try Linq with database now. Database I use was SQL Express 2005. Let's begin the lessons: First, create new project, choose windows application. Second, choose data connection and data source of database we want to use. Third, add new item and choose Linq to SQL Classes. The file will create and drag the tables or stored procedure in it. Fourth, done. Hahaha. And now, let's use Linq in database case. Here we can see how easy we can manipulate the code and the efficiency of writing code in vb 9. Debug.Print(Presensi.nama_karyawan, Presensi.Uang_Makan) Those codes above will connect to presensi where the presensi was stored procedure in my database. Below is an example of dbml (LINQ TO SQL CLASSES). Hope you enjoy it.
Dim presen = From absensi In db.Presensi(2008, 4) Select absensi
For
Each Presensi In presen
Next
Thursday, May 29, 2008
Simple Manipulation Database with VB Express 2008
at 11:23 AM
Subscribe to:
Post Comments (Atom)



0 comments:
Post a Comment