Bahan:
1. Iso Win8
2. DVD/USB Fdisk untuk booting
caranya:
Fdisk :
– Masuk ke Control Panel>Recovery>Create a recovery drive>bootable System Recovery USB. Ikuti petunjuk dari situ.
CD/DVD Recovery System:
– Masuk ke Control Panel>Windows 7 File Recovery>Create a System Recovery Disk. Ikuti petunjuk dari situ.
Langkah2nya:
- Boot ke PC yg password-nya pengen direset via DVD instalasi Windows 8/System Recovery Disk yg sdh dibikin. Pas menu setup pertama, ketik Shift+F10 utk buka Command Prompt.
- Ketik command2 berikut dlm command prompt:
diskpart
listvol <<perhatikan huruf partisi drive Windows-nya, misal di C:
exit
CD C:\Windows\System32
copy cmd.exe cmd.exe.BAK
copy utilman.exe utilman.exe.BAK
del utilman.exe
ren cmd.exe utilman.exe
shutdown -r -t 00
- Sehabis restart, di Logon screen, klik icon Ease of Access Center di bag. kiri bawah.
- Di command prompt yg terbuka, ketikkan:
net user
net user uye<<ganti baris kaskus dgn nama user PC-nya.
- Ketikkan password baru yg dimaui, konfirmasi ulang dan tekan Enter. Tutup Command Prompt. Password sudah direset.
- Logon kembali dan isikan password baru tsb. Boot kembali dgn DVD instalasi Windows 8/System Recovery Disk yg sama dan buka Command Prompt kayak cara diatas.
CD C:\Windows\System32\
del utilman.exe
ren utilman.exe.BAK utilman.exe
ren cmd.exe.BAK cmd.exe
shutdown -r -t 00
- Selesai..
What is Common Table Expression (CTE)?
A common table expression (CTE) is a temporary storage result set, which will be accessible within the next execution scope of a query. That means we didn’t get CTE result after the second query statement. A CTE is similar to a derived table in that it is not stored as an object and lasts only for the duration of the query. Unlike a derived table, a CTE can be self-referencing and can be referenced multiple times in the same query.
A very simple example of Common Table Expression (CTE) in SQL Server for pagination
Suppose we have a table ‘Employee’ with following structure. Suppose we need to apply pagination for this table, that means fetch only some part of data within the given index. To achieve this, we usually insert all records into a temporary table to get a new id column as row number. Then we have to fetch data from this table as per this new column.
Table Structure:

By using Common Table Expression (CTE) we can accomplish pagination query with single statement as follows. In our CTE we are fetching data with row number, and from this CTE we are fetching some range of data as we needed. This query helps to get pagination data in SQL Server using CTE with single execution of query. The scope of the CTE will be ended just after this execution of statement.
WITH CTE AS ( SELECT id ,name ,age ,joindate ,ROW_NUMBER() OVER (ORDER BY id DESC) AS RowNumber FROM employee ) SELECT * FROM CTE WHERE RowNumber BETWEEN 1 AND 5;
OUTPUT:

Is it possible Nested Common Table Expression (CTE) in SQL Server?
In some scenario we need to do some calculation from the result of first CTE and have to generate another result from the first CTE. For doing that, can we do CTE inside another CTE? To accomplish this we can try with nested CTE in SQL Server which means declare a new CTE just after the first CTE to use result of first CTE. Suppose we need to get number of years of experience of each employee. If we have very large number of data in the table, it will be very slow if we calculate this much of employee’s service years (If we have to fetch only 5 at a time).
In this case what is the better method is, first of all fetch the 5 records (pagination size) from the table, and apply the all calculation that we need to do for these 5 records only. We can accomplish this technique using CTE. What we are going to do is, first fetching 5 records from the table using CTE1, and then the very next step we are creating next CTE2. In CTE2 we are doing all calculation which we needed with result of CTE1. Then it will be a faster pagination in SQL Server even having any complex calculation in the query. This nested CTE mechanism can be applied for anywhere in the SQL Server if we have any more complex calculation have to be done from the previous results. We can n number of CTE in nested CTE SQL Server 2005/2008. The last CTE can use previous CTE result, which can be used just previous CTE result and so on.
;with CTE1 as ( SELECT id ,name ,age ,joindate ,ROW_NUMBER() OVER (ORDER BY id DESC) AS RowNumber FROM employee ) ,CTE2 AS ( SELECT CTE1.id ,CTE1.name ,CTE1.age ,CTE1.joindate ,CTE1.RowNumber ,DATEDIFF(YEAR,CTE1.joindate,GETDATE()) as yearOfservce FROM employee INNER JOIN CTE1 ON employee.id = CTE1.id WHERE CTE1.RowNumber between 1 and 5 ) SELECT * FROM CTE2;

Why need to use Common Table Expression (CTE) for pagination query?
In some scenario there is some complex calculation have to do for the fetching queries. In such case if we do this calculation for all data in the table and fetch only paginated rows finally, there is some performance issue will be there and we didn’t get proper useful for using pagination. For this scenario we have to fetch paginated row from the table and do the complex calculation to those paginated rows only, it will improve the performance of pagination query. We can achieve it same as above queries using CTE (Common Table Expression) in SQL Server 2055/2008 for pagination. Common Table Expression (CTE) improve the performance of the pagination query in SQL Server as it takes only needed data first then do the calculation as above query.
salah satu software Universal USB Installer yang recomended.. download di sini
Berikut ini adalah contoh melakukan PrintPreview dari data yang ada di DataGridView secara langsung / apa adanya tanpa perantara (database/table). VBNET 2008/2010 memang tidak menyediakan fitur agar anda dapat melakukan PrintPreview secara langsung, maka dari itu harus ada sedikit explorasi sintak. Sebenarnya anda dapat melakukannya dengan event .DrawToBitmap() yang kemudian dikirimkan ke PrintDocument1 .
download source code project nya di sini: http://adf.ly/I8knc
Pada umum nya untuk print laporan dari Crystal Report lebih nyaman kalo kita preView dulu baru print, tp kalo laporan yang kita mau print sudah pasti, hal tersebut akan membuang” waktu..
oleh karena itu, kenapa tidak langsung saja kita print laporan yang di inginkan tanpa preView terlebih dahulu..
pada dasarnya mencetak report dengan direct print sama dengan print preview,
contoh print preview:
Dim rp As ReportDocument
rp = New Rep_cetakPO
rp.SetDataSource(ds.Tables(0))
CrystalReportViewer1.ReportSource = rp
CrystalReportViewer1.RefreshReport()
tp ada beberapa parameter yang di rubah:
Dim rp As ReportDocument
rp = New Rep_cetakPO
rp.SetDataSource(ds.Tables(0))rp.PrintToPrinter(1, False, 0, 0)
‘Simpan dalam action,
Dim o As Object
For Each o In GetObject(“winmgmts:”).InstancesOf(“Win32_Processor”)
Label1.Text = “NamaProcessor = ” & Trim(o.Name)
Label2.Text = “ClockSpeed = ” & o.MaxClockSpeed & ” Mhz”
Label3.Text = “ID = ” & o.ProcessorID
Label4.Text = “Versi = ” & o.Version
Label5.Text = “Deskripsi = ” & o.Description
Label6.Text = “Pabrik = ” & o.Manufacturer
Next
Label7.Text = “Jumlah core = ” & Environment.ProcessorCount
MERGE TABLE tblMain AS main USING (SELECT ID,NAME,EMAIL_ID FROM tblStage) as stage ON main.ID=stage.ID WHEN MATCHED THEN UPDATE SET main.ID=stage.ID, main.NAME=stage.NAME, main.EMAIL_ID=stage.EMAIL_IDwhen not matched then insert(id, name, email_id) values (stage.id, stage.name, stage.email_id)
Table data:
idLigne | idperson | statut
--------|----------|-------
L1 1 A
L2 1 B
L3 1 A
L4 1 B
L5 2 A
L6 2 B
L7 3 A
L8 3 B
Desired output:
idLigne | idpersonne | firstLighe | secondLigne
--------|------------|------------|------------
L2-L1 1 L1 L2
L4-L3 1 L3 L4
L6-L5 2 L5 L6
L8-L7 2 L7 L8
Best Answer:
DECLARE @MyTable TABLE(idLigne VARCHAR(2), idperson INT, statut CHAR(1)); INSERT INTO @MyTable VALUES ('L1',1,'A') , ('L2',1,'B') , ('L3',1,'A') , ('L4',1,'B') , ('L5',2,'A') , ('L6',2,'B') , ('L7',3,'A') , ('L8',3,'B') ; WITH a AS ( SELECT idLigne=t2.idLigne+'-'+t1.idLigne , idpersonne=t1.idperson , firstLigne=t1.idLigne , secondLigne=t2.idLigne , r1=ROW_NUMBER()OVER(PARTITION BY t1.idLigne ORDER BY t2.idLigne) , r2=ROW_NUMBER()OVER(PARTITION BY t2.idLigne ORDER BY t1.idLigne) FROM @MyTable t1 INNER JOIN @MyTable t2 ON t1.idperson=t2.idperson AND t1.statut='A' AND t2.statut='B' ) SELECT idLigne , idpersonne , firstLigne , secondLigne FROM a WHERE r1=r2 GO
Introduction:
Here we will discuss different editions of SQL Server. Microsoft makes SQL Server avaible in different editions with different feature sets and targeting different users. Also you can check my last article on how to Change Authentication mode After installation of SQL Server. Visit Asp.Net, C#.Net, SQL Server andSharePoint articles more.
Description:
The different editions of Microsoft SQL Server are like SQL Server Compact Edition, SQL Server Developer Edition, SQL server 2005 Embedded Edition, SQL Server Enterprise Edition, SQL Server Evaluation Edition, SQL Server Express Edition, SQL Server Fast Track, SQL Server standard Edition,
SQL Server Web Edition, SQL Server Workgroup Edition.
1-SQL Server Compact Edition:It has very less no of features compair to the other editions, so its small in size.
It supports a subset of standard data types ,doesn’t support stored procedures or views or ultiple batch statements etc.
It is limited to 4GB maximum size of database and cannot be run as a windows service.
2-SQL Server Developer Edition:SQL Server Developer Edition includes the same features as SQL Server Enterprise edition, but is limited by the license to be only used as a development and test system, and not as production server.
3-SQL server 2005 Embedded Edition:SQL server 2005 Embedded Edition is a specially configured named instance of the SQL Server Express database engine which can be acessed only by certain Windows Services.
5-SQL Server Evaluation Edition:SQL Server Evaluation Edition is also known as Trial edition. It has all the features of Enterprise Edition, but is limited to 180 days after that the server service will stop.
6- SQL Server Express Edition:SQL Server Express Edition is a free edition of sql server. It is limited to using 1 processor, 1 GB memory and 4 GB database files.
The entire database is stored in a single .mdf file.Two additional editions provide a superset of features not in the original Express edition.
The first is SQL Server Express with tools, it includes SQL Server management Studio basic.
The second one is SQL Server Express with Advanced Services, it includes full-text search capability and reporting services.
7- SQL Server Fast Track:SQL Server Fast Track is for enterprise-scale datawarehousing storage and business inteligence processing.
8-SQL Server standard Edition:SQL Server standard Edition includes the core database engine, along with the stand-alone services.
9-SQL Server Web Edition:SQL Server Web Edition is a low-TCO option for Web hosting.
10-SQL Server Workgroup Edition:SQL Server Workgroup Edition includes the core database functaionality but doesnot include the additional services.